custom toolbar

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
nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

custom toolbar

Post by nkwinder » Thu Mar 05, 2009 2:31 pm

hello i want to create my own custom toolbar class, with support for custom bitmap buttons etc. At first i thought i could derive from wxPanel, and just use wxBitmapButton but i don't actually want the buttons to have a native appearance.

I want to implement my own 3d effects for pressed state and so on. I guess i must use dc. But i don't know where to start, ( i don't have much experience yet).

Can anyone point me to the wright direction?

thanks

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: custom toolbar

Post by Auria » Thu Mar 05, 2009 4:12 pm

nkwinder wrote:hello i want to create my own custom toolbar class, with support for custom bitmap buttons etc. At first i thought i could derive from wxPanel, and just use wxBitmapButton but i don't actually want the buttons to have a native appearance.

I want to implement my own 3d effects for pressed state and so on. I guess i must use dc. But i don't know where to start, ( i don't have much experience yet).

Can anyone point me to the wright direction?

thanks
Hi,

on the wiki you can find examples of how to get started with drawing custom stuff : http://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC

nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

Post by nkwinder » Fri Mar 06, 2009 5:11 pm

i 've used dc drawing before for an image processing app, but now it's a bit different because now we are talking about buttons and toolbar not just a dc with an image drawn.

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Sat Mar 07, 2009 12:16 am

nkwinder wrote:i 've used dc drawing before for an image processing app, but now it's a bit different because now we are talking about buttons and toolbar not just a dc with an image drawn.
Well there are multiple ways to go, depending on your personnal preferences. I would myself draw it all on the DC, then catch mouse events and react upon them.

Post Reply