Problem in Dialog with Sizers (in linux gtk ok, in windows not)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem in Dialog with Sizers (in linux gtk ok, in windows not)

franz steinhaeusler
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!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

FileSearchDlgTest.py (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem in Dialog with Sizers (in linux gtk ok, in windows not)

Tim Roberts
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, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem in Dialog with Sizers (in linux gtk ok, in windows not)

franz steinhaeusler
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 received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem in Dialog with Sizers (in linux gtk ok, in windows not)

Tim Roberts
On May 20, 2017, at 9:52 AM, franz steinhaeusler <[hidden email]> wrote:
>
> I use sizers.

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.

Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem in Dialog with Sizers (in linux gtk ok, in windows not)

franz steinhaeusler
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. ;)

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...