Hello group,
I have a smaller sample, which should demonstrate the problem.
In Linux/gtk, ist everything fine, but in MS Windows 7 not.
I have found out with Inspector (which is btw. a great tool), that the first static Text field fills out the whole space in the first notebook tab.
I cannot click into the first or second Textbox (near label “Name:” and “Look In:”
Whats wrong about the dialog, what could be a workaround?
wxPython 2.7
Many thanks in advance!
FileSearchDlgTest.py (8.52 KB)
franz steinhaeusler wrote:
I have a smaller sample, which should demonstrate the problem.
In Linux/gtk, ist everything fine, but in MS Windows 7 not.
I have found out with Inspector (which is btw. a great tool), that the
first static Text field fills out the whole space in the first
notebook tab.
I cannot click into the first or second Textbox (near label "Name:"
and "Look In:"
Whats wrong about the dialog, what could be a workaround?
By explicitly overriding the window styles, you are eliminating all of
the standard dialog styles, including those that control focus
handling. Just do this:
def __init__(self, pParent):
wx.Dialog.__init__ (self, pParent, -1, _("File search"))
By the way, your life will be much easier if you use sizers instead of
absolute positioning.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Hello Tim, thank you for your answer, but that didn’t help me. Ok, the sample is not good (it is in a middle of transition process from C++ wxWidgets to wxPython).
Something must be wrong. Again the annoying Os inconsistences between Windows and Linux.
I use sizers. But the Static Text control
self.m_wndFileNameLabel = wx.StaticText (self.m_wndNamePg, -1, _("Name:"), wx.Point(0,0))
self.m_wndFileNameLabel.SetDimensions( 5, 13, 40, 22)
occupies after puting it into the Boxsizeer the whole available Space in the tab control (and that is only for Windows, and not in gtk).
If I don’t find the “bug”, maybe best to create the dialog new from the scratch.
You use sizers for the overall window layout. You are not using sizers to place items on the notebook pages. You are using absolute positioning. It's always tricky to mix placement techniques.
···
On May 20, 2017, at 9:52 AM, franz steinhaeusler <franz.steinhaeusler@gmail.com> wrote:
I use sizers.
—
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
I think, was on the wrong trail.
I found an example, which uses own panels for creating noteboox pages.
Inside each single panel, I use a sizer now. It is a lot of work, but its working
for the whole notebook, I put it in an extra boxsizer, which I combine with the outer controls (the buttons and the listctrl).
BTW: it would be useful in demo, that a real world Dialog Example with boxsizers (or other sizers) would be included.
I find the sizers still confusing (for example, I don’t understand, why a AddSpacer surrounds the whole space (and not only in the direction of the boxsizer direction)
Also a single dialog example, which is solved with different sizers, which produce the same (or almost the same) layout.
Also the listctrl sample is very big and complex (there are the list mixins) also included). A small sortable Listctrl sample, I thnk, would be helpful.
But nevertheless, wxPython is a very good framework.