How to change Menubar style?

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
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

How to change Menubar style?

Post by div »

Hi,

I need to change the wxMenubar Style. can anyone help regarding this.

Div.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Post by evstevemd »

What exactly do you want to change? Words and Icon? or what
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

Post by div »

I want to change the style of the menubar like VS IDE menubar look and feel. need to change the height of menubar. if we enable vista theme, the menubar gets 3D look, but i want flat.
Thanks for ur reply.

Div
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin »

For the 3d/flat look, if you use 2.9 you need to update to r62971 or apply the corresponding changes.
http://svn.wxwidgets.org/viewvc/wx?view ... sion=62971
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

Post by div »

Thanks.
after update those files, we need to rebuild the wxwidgets src? i cudnt rebuild. so many errors are cuming. can u pls help me regarding this. shall i use wxFlatMenu? if so, pls send me the wxFlatMenu files. Bcas i cudnt open the link
http://www.eistware.com/flatmenu/wxFlatMenu.zip
Thanks in advance....
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin »

One remark: you need to use wxTB_FLAT flag when creating the toolbar in your sources (see the docs). Assuming you did so, it will not work on Vista; you'll still see the toolbar as 3d (on XP I didn't see any wrong behavior) and that revision fixes that among others.
div wrote:after update those files, we need to rebuild the wxwidgets src? i cudnt rebuild.
Yes, you need to rebuild wxW, and if you cannot you need to see why and resolve that problem first.
div wrote:shall i use wxFlatMenu? if so, pls send me the wxFlatMenu files. Bcas i cudnt open the link
http://www.eistware.com/flatmenu/wxFlatMenu.zip
Sorry, I know nothing about wxFlatMenu, except that I think it is a wxPython implementation, so nothing to do with c++ wxW. And I'm not a file repository either :)
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

Post by div »

:D Thank u... I will try and let u know.
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

Post by div »

Hi,

In updated version, wxWindowBase class is an abstract class, so we need to implement the pure virtual funtion in all the derived class rit. i got only toolbar.h, toolbar.cpp, window.h and window.cpp these files. how can i update all otehr files.
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin »

Where exactly do you care about wxWindowBase? It should be a hidden implementation detail, nothing you need to change.

What "other files"?

What wxW version did you update? The change is only for 2.9.x
How exactly did you update? did you copy only the lines regarding that revision to each file or replaced the whole files (which would be wrong)?

you can just download a 2.9.1 source snapshot, maybe it will be simpler.
http://wxwindows.sourceforge.net/snapshots/
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

Post by div »

I m using 2.9.0 version. I ll download the latest version, try and let u know. thanks....
div
Earned a small fee
Earned a small fee
Posts: 14
Joined: Sat Feb 13, 2010 7:05 am

Post by div »

I checked the version which u send. But no change in menubar. How to create a menubar with flat style when windows vista theme enabled.
Post Reply