Re: Bitmap button default
"Brendan Simon (eTRIX)" <[email protected]> Sat, 6 Jul 2019 15:28:30 +1000
| Newsgroups | gmane.comp.python.wxglade |
|---|---|
| Organization | eTRIX pty ltd |
| Message-ID | <[email protected]> |
On 5/7/19 5:15 pm, Brendan Simon (eTRIX) wrote: > > ------------------------------------------------------------------------ > > On 5/7/19 5:01 pm, Brendan Simon (eTRIX) wrote: >> Hi Dietmar and co, >> >> Mac, wxglade 0.9.3, python 3.6 => generating C++ code. >> >> I've got 5 bitmap buttons in some grid sizers. The first button in >> the first grid is always highlighted (light blue) as if it is the >> default button, but the default checkbox is not ticked for any button. >> >> Even if I select one of the other buttons to be the default (ticked >> default checkbox), the first button still remains highlighted and the >> the button I checked as default does not get highlighted. >> >> If I insert another button in a grid slot earlier than the current >> one that is highlighted, then the new one is now highlighted. >> >> If I add a dummy button (as above) and disable it or hide it, then >> the original button is now highlighted again. >> >> Is this a Mac specific thing or a wxWidgets thing? How do I make all >> buttons show normally, without any being highlighted? > I have a two grids - one either side of a custom widget: Grid1 | > Custom | Grid2 > > I can put the button anywhere in Grid2, including the very first slot, > and it doesn't get highlighted. If I cut-n-paste the button to > anywhere in Grid1 it gets highlighted (if it's the first button). > Putting another button before it makes the new button highlighted, and > the original button not highlighted. > > It's not a C++ generation issue. The problem shows up in the wxglade > Preview window (and the generated program). > > Any thoughts? My terminology was wrong. The button has "focus". It's not the "default" button. The only way I could work around it was to set the focus to another widget (but not another button as that doesn't work, even though first button can get focus as startup). I did have a textctrl which I use as a read-only console log. I set the focus to that and now none of the buttons have focus and look good. It's a bit weird having a read-only widget have focus. It's still a kludge in my opinion. What if I had no other (input) widgets to force focus on? Now, with this work around of setting the textctrl to have focus, wxglade preview window still has the button with focus, not the textctrl. I assume this is a bug in wxglade. Brendan. _______________________________________________ wxGlade-general mailing list wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/wxglade-general