Can menus in wxMenuBar have icons/images? Topic is solved
Can menus in wxMenuBar have icons/images?
Hello,
Is there any method, to get menus with corresponding icons/images on the left of the menu label? Just as it appears in visual studio. I have attached a sample file for your reference.
Thanks
Regards
Rakesh Patil
Is there any method, to get menus with corresponding icons/images on the left of the menu label? Just as it appears in visual studio. I have attached a sample file for your reference.
Thanks
Regards
Rakesh Patil
- Attachments
-
- 1052-01.png (24.76 KiB) Viewed 4310 times
Re: Can menus in wxMenuBar have icons/images?
Hi,
wxMenuItem::SetBitmap(...) should do what you want.
wxMenuItem::SetBitmap(...) should do what you want.
Re: Can menus in wxMenuBar have icons/images?
Hi Dummy,
Sorry for not being more specific about my question. I have used that function to get icons, but I just wanted to know is it possible to get a strip on the left hand side as shown in image? Please note the seperator line, from where it starts and from where it ends( both in image and in wxWidget one).
So is it possible to get this look and feel?
Thanks
Regards
Sorry for not being more specific about my question. I have used that function to get icons, but I just wanted to know is it possible to get a strip on the left hand side as shown in image? Please note the seperator line, from where it starts and from where it ends( both in image and in wxWidget one).
So is it possible to get this look and feel?
Thanks
Regards
- bishop.gis
- Earned a small fee
- Posts: 20
- Joined: Fri May 25, 2012 6:47 pm
Re: Can menus in wxMenuBar have icons/images?
I have such look of wxmenu under Windows 7. Is is close to you expectation?
Also, under Ubuntu there are no icons at all Re: Can menus in wxMenuBar have icons/images?
Yes. That's how I wanted. How did you get it? Is it the same code or any you wrote your own class?
Regards
Regards
Re: Can menus in wxMenuBar have icons/images?
For this exact look and feel (Office 2003 style), you can try wxFlatMenu. Try reading this thread.rakeshthp wrote:Hi Dummy,
Sorry for not being more specific about my question. I have used that function to get icons, but I just wanted to know is it possible to get a strip on the left hand side as shown in image? Please note the seperator line, from where it starts and from where it ends( both in image and in wxWidget one).
So is it possible to get this look and feel?
Thanks
Regards
Re: Can menus in wxMenuBar have icons/images?
This is how menu looks in menu sample bundled with wxWidgets 2.9.4, so I doubt you have to use an external component to achieve that look. In 2.8, the vertical line is not there. AFAIK wxWidgets 2.9 are considered production ready (it is not considered stable as in "API is frozen").
- Attachments
-
- wxmenu.png (19.95 KiB) Viewed 4271 times
Re: Can menus in wxMenuBar have icons/images?
The screenshot you are showing is an example of the default native menu look.
That is not the menu style that is shown in the original post.
In either case, icons are always supported.
That is not the menu style that is shown in the original post.
In either case, icons are always supported.
Re: Can menus in wxMenuBar have icons/images?
Nevertheless, it matches the menu look displayed in the bishop.gis' post, to which the OP replied "Yes. That's how I wanted. How did you get it? Is it the same code or any you wrote your own class?"ptDev wrote:The screenshot you are showing is an example of the default native menu look.
That is not the menu style that is shown in the original post.
Re: Can menus in wxMenuBar have icons/images?
Hi,
Well, it would be nice if it is possible to get the same effect as it is shown in original post. But something is better than nothing, so I compromised with bishop.gi's output. Well, I tried with 2.9.4 version. I am not getting like the one shown by PB.
And the links in the thread which ptDev gave reference, are broken links. None opens properly. Even after googling for wxFlatMenu, I wasn't able to find a proper link to download it. When will it be added to the main trunk of wxWidgets?
Thanks & Regards
Well, it would be nice if it is possible to get the same effect as it is shown in original post. But something is better than nothing, so I compromised with bishop.gi's output. Well, I tried with 2.9.4 version. I am not getting like the one shown by PB.
And the links in the thread which ptDev gave reference, are broken links. None opens properly. Even after googling for wxFlatMenu, I wasn't able to find a proper link to download it. When will it be added to the main trunk of wxWidgets?
Thanks & Regards
Re: Can menus in wxMenuBar have icons/images?
rakeshthp wrote:Hi,
Well, it would be nice if it is possible to get the same effect as it is shown in original post. But something is better than nothing, so I compromised with bishop.gi's output. Well, I tried with 2.9.4 version. I am not getting like the one shown by PB.
Note that it will look like this under Windows 7, not XP.
If you dig a little deeper in that thread, you will find this link: http://codelite.org/download/wxflatmenu-src.zip to the wxFlatMenu source, including a sample. You might need a bit of adapting before you get the demo app to build.And the links in the thread which ptDev gave reference, are broken links. None opens properly. Even after googling for wxFlatMenu, I wasn't able to find a proper link to download it. When will it be added to the main trunk of wxWidgets?
Re: Can menus in wxMenuBar have icons/images?
Thanks ptDev. That one is excellent.