Default Button

FlexibleLearning admin at
Fri Sep 2 03:57:51 EDT 2011

'Default' determines the button's visual appearance, and on some platforms
the change in border will grow the button dimensions a bit.

It's behavior should be up to the designer, by Enter and/or Return key
stroke, EnterInField and/or ReturnInField key stroke, or indeed none.

I have never relied on the engine to trap the default button activation
because it only works when nothing else is focussed.

Hugh Senior

Perte wrote:

Thanks everyone.

Jacque, Like you I'm currently using a returnKey handler for the card that
sends mouseUp to the button to get round this.

Craig, If I "put the defaultbutton of this card", I get the correct output.
 Also, I'm not seeing anything in the dictionary about the button changing
size - is that in the defaultButton entry?

Mark, maybe the difference between what you did and what I have is that I
have 3 field controls on the card in addition to the default Button.  Each
of the field controls has lockText set to true and traversalOn set to false.
 Thing is, the dictionary says the default button behavior only works if
there is no active control on the card, but it doesn't define what an active
control is so I don't know if the way I defined the field controls qualifies
them as being inactive or not.

I'm getting the behavior I want by using the card level returnKey handler
but wondering whether I should enter a bug report about this. There doesn't
seem any point in defining a button as the default button unless it acts as
defined in the dictionary, but it would be good to know what qualifies as an
"active control" before reporting it as a bug.


More information about the Use-livecode mailing list