Native icons for ImageMenus

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Native icons for ImageMenus

Post by netmaestro »

Purebasic has long been able to create toolbars natively and the ToolBar library contains a nice set of "stock" images for rapid development, such as #PB_ToolbarIcon_Open, etc. This, imho, is really slick. Since v4.20 saw the appearance of ImageMenus, and menu functions often mirror toolbar button actions, it seems natural to me that the native ToolBar imagelist could be made available to the ImageMenu. Then one could write code such as:

Code: Select all

MenuItem(0, "Open", #PB_MenuIcon_Open)
Saving the coder quite a bit of trouble.

Thanks for listening :mrgreen:
BERESHEIT
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Native icons for ImageMenus

Post by srod »

Excellent suggestion.
I may look like a mule, but I'm not a complete ass.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Native icons for ImageMenus

Post by DoubleDutch »

+1
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Native icons for ImageMenus

Post by Rescator »

Or just add a link in the manual to http://tango.freedesktop.org/Tango_Desktop_Project
There are probably a few other similar projects out there too.
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

Re: Native icons for ImageMenus

Post by zxtunes.com »

+2
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Re: Native icons for ImageMenus

Post by Num3 »

Count me in!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Native icons for ImageMenus

Post by blueznl »

Oh, simple and useful, I like this as well...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply