Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Textbox/Combos SetFocus & Sel**** Bugs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Textbox/Combos SetFocus & Sel**** Bugs

 Post Reply Post Reply
Author
Message
mojiro View Drop Down
Newbie
Newbie


Joined: 15 September 2007
Location: Greece
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote mojiro Quote  Post ReplyReply Direct Link To This Post Topic: Textbox/Combos SetFocus & Sel**** Bugs
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2007 at 6:05am
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
Back to Top
gaudetm View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 September 2006
Location: Canada
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote gaudetm Quote  Post ReplyReply Direct Link To This Post Posted: 01 October 2007 at 9:48pm
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...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2007 at 1:13am
Hi,
Please attach small sample project. I have no idea what need to check.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JimK View Drop Down
Newbie
Newbie


Joined: 27 September 2007
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote JimK Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2007 at 9:58am
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.
Back to Top
JimK View Drop Down
Newbie
Newbie


Joined: 27 September 2007
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote JimK Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2007 at 10:13am
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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.