How can i highlight the default text

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Ultravibe
Posts: 65
Joined: Sat Jan 17, 2015 12:06 pm

How can i highlight the default text

Post by Ultravibe »

Hi all!
I've got a stack:
Text labels and some text fields with sportsman's data (Number, Name, Surname etc).
When clicking on one of it runs the modal stack with text entry field. Initially, text field has "previous" value of field that we clicked in main window.
I need to highlight this "previous" text. But how?
Advise me some handlers or smthg else...
sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: How can i highlight the default text

Post by sritcp »

The "ask" command opens a modal window with the default text highlighted, e.g.,

Code: Select all

ask "What is your surname?" with the text of field "Surname"
Is this what you wanted?

Regards,
Sri.
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How can i highlight the default text

Post by Klaus »

Hi Ultravibe,

not sure I understand, but I would add this to the "opencard" script of your modal stack:

Code: Select all

on opencard
  select text of fld "the one with the PREVIOUS text in it"
  ...
end opencard
Know what I mean?


Best

Klaus
Ultravibe
Posts: 65
Joined: Sat Jan 17, 2015 12:06 pm

Re: How can i highlight the default text

Post by Ultravibe »

Sri, thank U, but the way that advise Klaus is better, because no need to change structure of program code etc :)

Klaus, thank U so much!
sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: How can i highlight the default text

Post by sritcp »

Hi Ultravibe:

Klaus is not just better, he is the best!

Sri.
Post Reply