Positioning Cursor at end of combobox

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Positioning Cursor at end of combobox

Post by newpie » Wed May 04, 2016 2:57 am

Hello, I was trying to figure out how to place my cursor at the end of a string after someone has typed a few letters in a combobox as my script takes the cursor away after they do this and I need to return to combobox when done.

Similar to this

Code: Select all

select after field "field1"
with a field.

I appreciate any help. Thanks

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Positioning Cursor at end of combobox

Post by dunbarx » Wed May 04, 2016 3:23 pm

Hmmm.

I tried several kluges, and none worked. No errors, but no cursors. In a button script somewhere, where the combo is btn 1:

Code: Select all

on mouseUp
   get the selectedchunk of btn 1
    get word 2 of the selectedLine of btn 1
    select after  line it of btn 1
end mouseUp
These are snippets from several tests, and mean nothing. But they show that the text properties of the button, which are its contents, which are its menuItems, are there, I just can't quite figure out how to use "field" properties in a button.

Something interesting. If you step through the handler above, you can see a "blink" of a selection being made in the combo in line 3. I do not see it when it simply runs. I may keep trying...

Craig Newman

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Positioning Cursor at end of combobox

Post by newpie » Thu May 05, 2016 1:19 am

Thanks Craig, congrats on your quote on front page for LiveCode 8.

Hope you have luck positioning the cursor.

Post Reply