Page 1 of 1

Positioning Cursor at end of combobox

Posted: Wed May 04, 2016 2:57 am
by newpie
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

Re: Positioning Cursor at end of combobox

Posted: Wed May 04, 2016 3:23 pm
by dunbarx
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

Re: Positioning Cursor at end of combobox

Posted: Thu May 05, 2016 1:19 am
by newpie
Thanks Craig, congrats on your quote on front page for LiveCode 8.

Hope you have luck positioning the cursor.