How do you build the tabs like in the script editor
Jim Ault
jimaultwins at yahoo.com
Mon Jun 6 18:49:35 EDT 2011
On Jun 6, 2011, at 3:05 PM, Bob Sneidar wrote:
> It's actually more like a menu. One of the caveats (at least in the
> past, they may have fixed it) is that like some types of menus,
> picking the same thing as you picked last time does not generate the
> menuPick command, so you have to fudge it.
This is true.
It is like clicking the same radio button in a group.
If the user makes the same choice in a menu, since there is no change,
should the menupick report it?
If you want that, then take steps to manage the menuhistory, like
--- simple test for menu buttons and tab buttons
on menuPick pItemName
;put pItemName && the ticks
end menuPick
on mousedown
;put "down" && \
line (the menuhistory of me) of the text of me \
&& the ticks
end mousedown
------------------------------------
local xLastUserChoiceForThisMenu
on mousedown
;put "down" && line (the menuhistory of me) of the text of me
-- you can store the text of the last user action
put (the menuhistory of me) into xLastUserChoiceForThisMenu
--now you can compare each user repeat of a tab click
end mousedown
-----------------------------------
Hope this helps.
Jim Ault
Las Vegas
More information about the use-livecode
mailing list