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 » Tue May 06, 2014 4:22 am

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: 429
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: Looking for button with image

Post by xaviou » Tue May 06, 2014 8:16 am

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 : [email protected]'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 » Tue May 06, 2014 3:48 pm

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 3348 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 » Wed May 07, 2014 3:28 pm

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: 429
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: Looking for button with image

Post by xaviou » Wed May 07, 2014 3:34 pm

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 : [email protected]'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 » Wed May 07, 2014 5:25 pm

Hm. It looks much better without ui theme:
normal_bitmap_alignment.png
normal_bitmap_alignment.png (5.84 KiB) Viewed 3308 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 » Sat May 10, 2014 4:01 am

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

Post Reply