How can i highlight the default text

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

Moderators: FourthWorld, heatherlaine, Klaus, 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 » Sat Jan 17, 2015 9:26 pm

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 » Sat Jan 17, 2015 11:53 pm

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: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How can i highlight the default text

Post by Klaus » Sun Jan 18, 2015 12:45 am

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 » Sun Jan 18, 2015 1:08 am

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 » Sun Jan 18, 2015 4:00 pm

Hi Ultravibe:

Klaus is not just better, he is the best!

Sri.

Post Reply