Button get focus, layout doesn't change

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
gmapp
Earned a small fee
Earned a small fee
Posts: 14
Joined: Wed Jan 24, 2018 4:39 pm

Button get focus, layout doesn't change

Post by gmapp » Mon Mar 19, 2018 9:37 am

Hi,
I'm working on a cross-platform GUI. On Linux when a button receives the focus doesn't change its look (no highlight frame around the button as usual).
Is it a known problem? Or a misconfiguration of my environment... any info?

Many thanks

OS: Linux Mint
wx: 3.0.3 and 3.1.1
code::block & gcc

DavidHart
Site Admin
Site Admin
Posts: 4005
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Button get focus, layout doesn't change

Post by DavidHart » Mon Mar 19, 2018 10:48 am

Hi,

I see what you mean. I'd not noticed before, but mint running both Cinnamon and Mate don't highlight. It seems true for some KDEs too e.g. kubuntu artful and xenial, though others work as expected. Gnome seems mostly to work, as does LXDE.

Presumably it's a choice made in each distro's DE/WM settings. I'm sure it's not a wx issue.

Regards,

David

gmapp
Earned a small fee
Earned a small fee
Posts: 14
Joined: Wed Jan 24, 2018 4:39 pm

Re: Button get focus, layout doesn't change

Post by gmapp » Mon Mar 19, 2018 12:46 pm

Hi,

Thanks for your test on other distros.
Ideas to implement a workaround?

Thanks

p.s. Button1->SetDefault() changes the layout of the Button1, why not also the focus after the tab_traversal... :(

DavidHart
Site Admin
Site Admin
Posts: 4005
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Button get focus, layout doesn't change

Post by DavidHart » Mon Mar 19, 2018 1:29 pm

Ideas to implement a workaround?
A workaround for whom?
For you, you could look in your system settings or gtk+ settings: there might be an entry for this. Otherwise, change to a different DE or distro.

However I presume you're thinking of your end-users. For those on an affected distro/DE, I doubt if a workaround is possible. However none is needed: wxWidgets tries to behave natively, delivering a look/feel that a user has come to expect on his particular installation. If he's not been bothered by this issue in other programs, he's unlikely to be concerned when it happens in yours. And if he was, he'd have already changed to LXDE or whatever.

Post Reply