How do I set the textStyle from a button?
sarahr at genesearch.com.au
Mon Dec 17 20:35:01 EST 2001
I think Geoff's idea about the mouseDown is the right way to go, but this
business of a button click changing the focus has further ramifications.
I have a stack that interacts almost completely through a barcode reader. I
get the input from the barcode reader by keyDown & rawKeyDown handlers in
the stack script. I discovered (the hard way) that if the user clicks on a
button, any further input from the reader does not get to the keyDown or
rawKeyDown handlers. Presumably it gets trapped by the button even though no
other keyDown/rawKeyDown handlers exist.
To get around this, at the end of every mouseUp handler, I use
"click at 0,0"
This gives the focus back to the stack and the barcodes get read in as
> Every time I try from a button:
> on mouseUp
> set the textStyle of the SelectedChunk to bold
> end mouseUp
> it doesn't work. It turns out that when the button is pressed, the focus
> leaves the field and the selectedChunk is now empty.
> I know this should be easy...
> | ___ ____ _ __ |
> | / _ | / / /___ __(_) /_ |
> | / __ |/ / __/ // / / __/ |
> | /_/ |_/_/\__/\_,_/_/\__/ |
> | http://www.altuit.com |
> | chipp at altuit.com |
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode