Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
Move Cursor to after Text in TEdit |
Fri, Jul 26 2019 1:26 AM | Permanent Link |
KimHJ Comca Systems, Inc | I have a ReadOnly TEdit, I will allow the user to change the content after answering Yes to a MessageDilalog.
In Delphi I would use SelLength, but it is not in EWB. After setting the TEdit to ReadOnly := false I use the SelectNone to turn of the selection, but I can't get the cursor inside the edit box, not even with SetFocus. if (DlgResult=mrYes) then begin LNameEd.ReadOnly := False; LNameEd.SelectNone; LNameEd.SetFocus; end; I found that after this the foucs must be on the web form, if I hit the BackSpace key the browser goes back to the prior url. Kim |
Fri, Jul 26 2019 9:30 PM | Permanent Link |
Raul Team Elevate | On 7/26/2019 1:26 AM, KimHJ wrote:
> I have a ReadOnly TEdit, I will allow the user to change the content after answering Yes to a MessageDilalog. > > In Delphi I would use SelLength, but it is not in EWB. After setting the TEdit to ReadOnly := false I use the SelectNone to turn of the selection, but I can't get the cursor inside the edit box, not even with SetFocus. > > if (DlgResult=mrYes) then > begin > LNameEd.ReadOnly := False; > LNameEd.SelectNone; > LNameEd.SetFocus; > end; > > I found that after this the foucs must be on the web form, if I hit the BackSpace key the browser goes back to the prior url. Try change order of this and see if it helps: LNameEd.Setfocus; LNameEd.SelectNone; Raul |
Sat, Jul 27 2019 12:52 PM | Permanent Link |
Ronald | Hi Kim,
I used the keypressed event: function Txx.Edit1KeyPress(Sender: TObject; Key: Char; ShiftKey, CtrlKey, AltKey: Boolean): Boolean; begin Edit1.SelectNone; Result:=true; end; That always "prepares" my TEdit. Ronald |
Sun, Aug 4 2019 12:04 AM | Permanent Link |
KimHJ Comca Systems, Inc | Raul wrote:
>>Try change order of this and see if it helps: LNameEd.Setfocus; LNameEd.SelectNone; << Thanks Raul i will give it a try. Kim |
Sun, Aug 4 2019 12:06 AM | Permanent Link |
KimHJ Comca Systems, Inc | Ronald wrote:
>>Hi Kim, I used the keypressed event: function Txx.Edit1KeyPress(Sender: TObject; Key: Char; ShiftKey, CtrlKey, AltKey: Boolean): Boolean; begin Edit1.SelectNone; Result:=true; end; That always "prepares" my TEdit.<< Thanks Ronald, that works. Kim |
This web page was last updated on Friday, November 1, 2024 at 07:01 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |