View previous topic :: View next topic |
Author |
Message |
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sun Jun 24, 2007 4:43 am Post subject: Disable popup menu item |
|
|
Is there a way (GadgetX.dll or VDSUG.dll?) to disable an item in a popup menu?
Like this (but with 'menu disable' replaced with an API message or defined command):
Code: | dialog popup,&Add New|-|D&elete All|-|Information|About
if @greater(@count(Table1),0)
# Table is empty
menu disable,Delete All
end
|
So it appears as:
------------
Add New
------------
Delete All
------------
Information
About
------------
Currently I use conditional statements to determine which menu items to include in popup menus:
Code: | if @equal(1,@selected(Table1))
# Single item selected
dialog popup,&Run|-|&Add|-|Re&name|-|&Delete|D&elete All
elsif @greater(@selected(Table1),1)
# Multiple items selected
dialog popup,&Add|-|&Delete Selected|D&elete All
else
# No items selected
if @greater(@count(Table1),0)
# Table has at least one item
dialog popup,&Add|-|D&elete All
else
# Table empty
dialog popup,&Add
end
end
|
But I'd prefer if all menu items were always shown, but with unusable items disabled, so the user would know what all the possible menu items are each time the menu is shown. _________________ cheers
Dave |
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Sun Jun 24, 2007 5:59 pm Post subject: |
|
|
Hi Dave :
There would be magnificent the option on that you comment. I suppose that a more professional option would be to use vdspopup.dll by PGWARE. But, if you want domestic recipe for this try to use my script popmenu.
Version 1.1 allows to disable any options.
download link:
http://vds.uvedese.es/index.php?option=com_content&task=view&id=47&Itemid=27
Good luck
________________________
uVeDeSe
Last edited by uvedese on Wed Apr 02, 2008 7:30 pm; edited 1 time in total |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Jun 25, 2007 4:34 pm Post subject: |
|
|
Dave,
While it is possible to do this with GadgetX. I think you would like using the vdspopup.dll from PGWARE since it would not require as much work as it would with GadgetX.
With GadgetX you would have to completely create the menu with API functions. _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|