T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #1 請教: 我用Richedit load RTF文章 如何讓Richedit只能顯示內容,不能選取內容,達到保護文章內容不被copy, paste?
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #3 richedit1.readonly=true 這只能防止修改,不能禁止copy ,paste.
W wcwcw Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #4 RichEdit1.Text := 'abcde'; RichEdit1.Enabled := False;
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #5 RichEdit1.Enabled := False; 這也不行!因無法捲動ScrollBox瀏覽內容
W wcwcw Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #6 richedit1.readonly :=true; procedure TForm1.RichEdit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin Key := 0; end;
richedit1.readonly :=true; procedure TForm1.RichEdit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin Key := 0; end;
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #7 begin Key := 0; end; 這也不行!還是可以copy(Ctrl+C),然後在記事本中paste(Ctrl+V)
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #8 begin Key := 0; end; 可以了!! 對不起,KeyDown 我寫錯地方了 再請教可以把字標位置如( I )字的符號關掉嗎?
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #9 to wcwcw: 我windows是繁體版,您發的訊息會亂碼,我看不到! 您可以教我第二個問題嗎? 在RichEdit1文本內有一個編輯位置的符號,像一個英文 I 字,如何不顯示?
W wcwcw Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #10 再請教可以把字標位置如( I )字的符號關掉嗎? 什么意思? 是不是不显示 字符I?
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #11 什么意思? 是不是不显示 字符I? 對!就是這個意思.
W wcwcw Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #12 //这个方法不太好, 但可以实现, 你可以试着将其改为ReplaceText 把“I”替换成其他的字符 procedure TForm1.Button1Click(Sender: TObject); var s: string; i: Integer; begin RichEdit1.Text := 'RICHEDIT'; s := RichEdit1.Text; repeat i := Pos('I',s); Delete(s,i,1); until Pos('I',s) <= 0; RichEdit1.Text := s; end;
//这个方法不太好, 但可以实现, 你可以试着将其改为ReplaceText 把“I”替换成其他的字符 procedure TForm1.Button1Click(Sender: TObject); var s: string; i: Integer; begin RichEdit1.Text := 'RICHEDIT'; s := RichEdit1.Text; repeat i := Pos('I',s); Delete(s,i,1); until Pos('I',s) <= 0; RichEdit1.Text := s; end;
D daiqingbo Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #13 HideCaret(RichEdit1.Handle);
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #14 to wcwcw:前輩您誤會我的意思. 是螢幕上一直閃爍的 I 字編輯光標. to daiqingbo: HideCaret(RichEdit1.Handle); 這代碼要寫在哪個procedure ?
to wcwcw:前輩您誤會我的意思. 是螢幕上一直閃爍的 I 字編輯光標. to daiqingbo: HideCaret(RichEdit1.Handle); 這代碼要寫在哪個procedure ?
D daiqingbo Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #15 知道方法就可以了吧,自己不试一下,怎么提高呢。 Just try it yourself, that's the way to improve your skill.
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #16 關閉螢幕上一直閃爍的 I 字編輯光標. 我之前就已經試了兩天,一直找不出方法,才敢來請教的? 只好再繼續埋頭苦幹了!! 8(............
D daiqingbo Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #17 Ok, I'll try it. Just wati 5 minutes.
W wcwcw Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #18 procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Button1.SetFocus; end; 不知道谁还有好的方法, 先关注吧!
procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Button1.SetFocus; end; 不知道谁还有好的方法, 先关注吧!
Z ZHENGYANG Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #19 试一试如下代码: procedure TForm1.RichEdit1SelectionChange(Sender: TObject); begin TRichEdit(Sender).SelLength := 0; end;
试一试如下代码: procedure TForm1.RichEdit1SelectionChange(Sender: TObject); begin TRichEdit(Sender).SelLength := 0; end;
T tayancom Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-05 #20 剛剛試出來另一個方法: 內容不被copy, paste? procedure TForm1.RichEdit1SelectionChange(Sender: TObject); begin RichEdit1.SelLength := 0 ; // 防止拷貝內容 end;
剛剛試出來另一個方法: 內容不被copy, paste? procedure TForm1.RichEdit1SelectionChange(Sender: TObject); begin RichEdit1.SelLength := 0 ; // 防止拷貝內容 end;