Textbox/Combos SetFocus & Sel**** Bugs |
Post Reply |
Author | |
mojiro
Newbie Joined: 15 September 2007 Location: Greece Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 28 September 2007 at 3:51am |
when I do
for textboxes txtName.SelStart = 0 txtName.SelLength = Len(txtName.Text) txtName.SetFocus I get no focus, also no visible selection even when I focus the control with mouse/keyboard. But... the seltext property has the right selected text. for combos cmbOption.SelStart = 0 cmbOption.SelLength = Len(cmbOption.Text) cmbOption.SetFocus the same as above but here I get visible selection when I customly focus the control. |
|
Networking Guides...
http://routing.explode.gr |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Just tried in in new project and it works quite fine. I added Textbox and Button and copied this code to Button_Click.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
gaudetm
Senior Member Joined: 23 September 2006 Location: Canada Status: Offline Points: 134 |
Post Options
Thanks(0)
|
try to evaluate the content of control.text event if text in it nothing for the property text so len of nothing =0 so no selection seem to be a bug with textbox and combobox control from codejock. anybody at codejock have notice this? any solution patch anything...
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please attach small sample project. I have no idea what need to check.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
JimK
Newbie Joined: 27 September 2007 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Yup, just encountered this myself and it means I have to go back to the good old vb textbox. To reproduce
Add a flat edit control, say approx 3 lines high and 40 chars wide. Set multiline to TRUE. Add a keyPress event that says if the text length is greater than 200 to then truncate it.
If len(FlatEdit.Text) > 200 then
Beep
FlatEdit.Text = left(FlatEdit.Text, 200)
FlatEdit.Text.SelStart = len(FlatEdit.Text)+1
endif
Run the program and start entering text. Make sure you enter enough to fill up more that the number of visible lines in the control, so that it has to scroll the text up in order to display what you are typing.
When you get to the 201 char, you will hear a beep but the caret will not be visible.
|
|
JimK
Newbie Joined: 27 September 2007 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Oops, just tried the simple steps I suggested earlier and the bug foes not occure :(. This is a bit more complicated that I thought. Will post more info if/when I get time to investigate....
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |