is it possible to have a custom menu bar using wxwidgets? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Hossein
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Sep 21, 2008 7:23 am
Location: Somwhere nearby...
Contact:

is it possible to have a custom menu bar using wxwidgets?

Post by Hossein »

hello, before i ask you the question i want you to know that , ive already asked this question else where and someone told me there are ways to do so but he doesnt know that!thats why im here , i copy the question and the answer so that you can understand me better.
here it is :
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)
answer:
wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.
so , how to do such things !?
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Derive from wxpanel, catch the paint event, draw the custom menu bar there. Then catch mouse events to be able to react. What happens next will depend on how your app is done. If you use a big drawing panel, you can draw the custom menu there. Otherwise, you'll need to pop-up a menu/frame. Will also depend if you only want the menu *bar* to have a custom look, or the menus themselves too.
Hossein
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Sep 21, 2008 7:23 am
Location: Somwhere nearby...
Contact:

Post by Hossein »

Auria wrote:Derive from wxpanel, catch the paint event, draw the custom menu bar there. Then catch mouse events to be able to react. What happens next will depend on how your app is done. If you use a big drawing panel, you can draw the custom menu there. Otherwise, you'll need to pop-up a menu/frame. Will also depend if you only want the menu *bar* to have a custom look, or the menus themselves too.
many tanx Dear Auria. :wink: by the way where can i find applications sample source codes that is made using Wxwidgets !?
ive already noticed http://www.lpthe.jussieu.fr/~zeitlin/wx ... ml#samples
but i cant find any source code! or at least a screen shot of any applications ! can you please help me on this too?
Add-on Components (90)
Applications (183)
Development Tools (27)
Icons and Resources (1)
Sample Code and Project Templates (10)
Utilities (4)
wxWidgets (10)

http://www.wxcommunity.com/
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Samples can be found in the source code download of wxWidgets, from the homepage in the downloads section.
Hossein
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Sep 21, 2008 7:23 am
Location: Somwhere nearby...
Contact:

Post by Hossein »

by the way, is it possible to customize a current widget.? or should we make a new one ?!
for example . consider Wxnotepad ! each page header has a rectangulare shape! , now i wana do sth about that header! wana make it looks fancier , sth similar to the Microsofts visual studio "start page"(see the picture below)
Image
or O&O Defrag 11 Professional Edition, (it has a fancy say page (notepad)header, with icons and that special shape!(see below):
Image
is the current wxnotepad capble of givving such a features?
or i should make one ! if iam the one who should such wx widgets would you guid me to a article/tut etc, so that i can make such a thing?
(ive a the wxbook by julian Smart but im at the beginning you know.)
Add-on Components (90)
Applications (183)
Development Tools (27)
Icons and Resources (1)
Sample Code and Project Templates (10)
Utilities (4)
wxWidgets (10)

http://www.wxcommunity.com/
Sof_T
Can't get richer than this
Can't get richer than this
Posts: 864
Joined: Thu Jul 28, 2005 9:48 pm
Location: New Forest, United Kingdom
Contact:

Post by Sof_T »

The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
Hossein
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Sep 21, 2008 7:23 am
Location: Somwhere nearby...
Contact:

Post by Hossein »

many tanx , you really did a great favor to me ,.
Add-on Components (90)
Applications (183)
Development Tools (27)
Icons and Resources (1)
Sample Code and Project Templates (10)
Utilities (4)
wxWidgets (10)

http://www.wxcommunity.com/
Post Reply