Looking for button with image

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
ArtDen
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Mar 17, 2013 7:01 am

Looking for button with image

Post by ArtDen »

wxButton with bitmap looks ugly even for 3.0.0. The problem was described 4 years ago:
http://trac.wxwidgets.org/ticket/11477
and since were no changes.

So I look for component with wxButton functionality but with proper image placement.
User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 437
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: Looking for button with image

Post by xaviou »

Hi

Did you simply try to pass a bitmap to a wxButton ? (with wxWidgets-3.0, wxButton has support for wxBitmap).

Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
ArtDen
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Mar 17, 2013 7:01 am

Re: Looking for button with image

Post by ArtDen »

xaviou, look at the ticket screenshot:
http://trac.wxwidgets.org/attachment/ti ... gnment.png
I mean image for wxButton works but it looks ugly aligned:
ugly_bitmap_alignment.png
ugly_bitmap_alignment.png (20.69 KiB) Viewed 4949 times
So I'm trying to find component like wxButton but with proper image alignment.
ArtDen
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Mar 17, 2013 7:01 am

Re: Looking for button with image

Post by ArtDen »

No idea about existing component? May be better to inherit wxButton and try to paint image manually?
User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 437
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: Looking for button with image

Post by xaviou »

Hi.
You can try with a wxBitmapButton, with only a wxBitmap as label (and you can re-create the full bitmap with the associated text).

Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
ArtDen
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Mar 17, 2013 7:01 am

Re: Looking for button with image

Post by ArtDen »

Hm. It looks much better without ui theme:
normal_bitmap_alignment.png
normal_bitmap_alignment.png (5.84 KiB) Viewed 4909 times
I think this is simply bug of wxWidgets.
ArtDen
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Mar 17, 2013 7:01 am

Re: Looking for button with image

Post by ArtDen »

It seems I have to select Qt. It's very dangerous to use GUI library having troubles in basic components.
Post Reply