Page 1 of 1

how to search this forum for refernces to the "find" command

Posted: Fri Jun 24, 2016 12:31 am
by dr_mumps
I am looking for any discussion of whether it is possible to highlight the box which the "find" command inserts. However, I can't seem to find (no pun intended) how to specify such a search. "find" is "too common a word" to search for.. and other combinations of a search like "+find +box", find 200+ pages mainly dealing with the Message box. So, my question is .. how can I search for the "find" command and, while I'm at it here, is there any way to highlight the "found" box?

Re: how to search this forum for refernces to the "find" com

Posted: Fri Jun 24, 2016 8:37 am
by Ormente
For that sort of things, Google is your friend. You can try a query like this one, then tweek it:

Code: Select all

site:forums.livecode.com find box
For the other question, i' don't know enough livecode to answer, but i would try (after checking the result) to "set the whateverProperty of last object to ...". For example "set the hilite of last object to true" maight work... and if not, maybe you could change border/backgroud/etc yourself to get the effect you want.

EDIT: i'm reading in the dictionary, as i didn't knew what a box was... it seems it's not an object added to the stack but a property of a selected block of text. So, my first idea will most certainly do nothing good.

Re: how to search this forum for refernces to the "find" com

Posted: Fri Jun 24, 2016 9:08 am
by Ormente
I did some tests to understand, and this works :

Code: Select all

on mouseUp
    find string "a string"
    put the foundChunk into sc
    if sc is not empty then
        set the backgroundColor of sc to "yellow"
    end if
end mouseUp
So, you can use foundChunk to style the found text as you wish.

EDIT: updated the code to check for sc emptyness.

EDIT2: i joined the result of my experiments as a stack.

Re: how to search this forum for refernces to the "find" com

Posted: Fri Jul 08, 2016 3:30 pm
by MaxV