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

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dr_mumps
Posts: 23
Joined: Wed Dec 24, 2014 7:00 pm

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

Post by dr_mumps » Fri Jun 24, 2016 12:31 am

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?

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm

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

Post by Ormente » Fri Jun 24, 2016 8:37 am

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.

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm

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

Post by Ormente » Fri Jun 24, 2016 9:08 am

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.
Attachments
findlighter.zip
Sample stack for find & highlight
(1.12 KiB) Downloaded 295 times

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

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

Post by MaxV » Fri Jul 08, 2016 3:30 pm

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply