Checking the disabled of a menu item
Éric Chatonet
eric.chatonet at wanadoo.fr
Wed Mar 16 03:55:17 EST 2005
Hi Graham,
Le 16 mars 05, à 00:28, Graham Samuel a écrit :
> put Menuitem 1 of menu "File" of group "Main_Menu" of cd "Store" of
> stack "Main_Display"
> Anyway how do people generally check the disabled status of menu items?
put char 1 of line 1 of btn "File" of group "Main_Menu" of cd "Store" \
of stack "Main_Display" = "(" into tDisabledStatus
tDisabledStatus variable will contain a boolean value (true or false).
Or build a more generic function:
if IsDisabled(1,the long ID of btn "File" of group "Main_Menu" \
of cd "Store" of stack "Main_Display") then etc.
function IsDisabled pLineNo,pMenuButton
do "return char 1 of line pLineNo of" && pMenuButton && "=
numToChar(40)"
end IsDisabled
You might be interested in checking my "#008 How to build a menu on the
fly" stack available from revOnline or Revnet.
Best regards,
Eric Chatonet.
----------------------------------------------------------------
So Smart Software
Pour les institutionnels, les entreprises et les associations
Des logiciels sur mesure : gestion, multimédia, internet, etc.
Windows, Mac OS et Linux... Avec la "french touch"
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list