Making scrolling dialog with full-sized controls?

Hey list,
I'm not sure if this will even make sense, but here goes. I have a
subclass of wx.Dialog which generates its layout based on a table
definition from SQLAlchemy. It creates text fields for every column
and, optionally, puts the text from a given database record into the
fields. This all works fine, though it likely doesn't look great.

What I want to do, though, is make sure my labels and text fields are
not squished. For a few columns this isn't a problem, but if there
were a lot of columns, things could shrink too far. Right now, I add
everything to horizontal sizers, and every three columns, I switch to
a new sizer. For fifteen columns, then, imagine how vertically
squished everything would be!

What I'd like is to have the fields and labels be full-sized, and the
dialog be scrollable. That is, as necessary, the user could scroll the
content around inside the dialog to reveal more of the fields, instead
of wx cramming everything into one box. I've found that I can make
dialogs scrollable, but the docs indicated that this was for small
screens, which isn't my problem here. Would this still work for what I
want, or should I look elsewhere? I hope I'm making sense!

Hi,
have you considered some kind of ListCtrl or Grid widget for this?
I haven't used such complex gui within a dialog sofar, but it looks
like some widget for tabular data might be useful in this case.
You can check the wxpython demo:
http://www.wxpython.org/download.php
to see the functionality of the available widgets.
hth,
   vbr

···

2016-02-03 19:40 GMT+01:00 Alex Hall <ahall@autodist.com>:

Hey list,
I'm not sure if this will even make sense, but here goes. I have a
subclass of wx.Dialog which generates its layout based on a table
definition from SQLAlchemy. It creates text fields for every column
and, optionally, puts the text from a given database record into the
fields. This all works fine, though it likely doesn't look great.

What I want to do, though, is make sure my labels and text fields are
not squished. For a few columns this isn't a problem, but if there
were a lot of columns, things could shrink too far. Right now, I add
everything to horizontal sizers, and every three columns, I switch to
a new sizer. For fifteen columns, then, imagine how vertically
squished everything would be!

What I'd like is to have the fields and labels be full-sized, and the
dialog be scrollable. That is, as necessary, the user could scroll the
content around inside the dialog to reveal more of the fields, instead
of wx cramming everything into one box. I've found that I can make
dialogs scrollable, but the docs indicated that this was for small
screens, which isn't my problem here. Would this still work for what I
want, or should I look elsewhere? I hope I'm making sense!

--
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 wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

A list is an interesting idea--it's inherantly scrollable, after all.
I'm certainly not set on having a dialog, I just wanted something that
would block the rest of the app while it's on the screen, in case a
user decided to go messing with things without saving changes to the
record. If I can somehow show it modally, I'm not opposed to just
making a new panel and doing the database operations there instead.

···

On 2/3/16, Vlastimil Brom <vlastimil.brom@gmail.com> wrote:

2016-02-03 19:40 GMT+01:00 Alex Hall <ahall@autodist.com>:

Hey list,
I'm not sure if this will even make sense, but here goes. I have a
subclass of wx.Dialog which generates its layout based on a table
definition from SQLAlchemy. It creates text fields for every column
and, optionally, puts the text from a given database record into the
fields. This all works fine, though it likely doesn't look great.

What I want to do, though, is make sure my labels and text fields are
not squished. For a few columns this isn't a problem, but if there
were a lot of columns, things could shrink too far. Right now, I add
everything to horizontal sizers, and every three columns, I switch to
a new sizer. For fifteen columns, then, imagine how vertically
squished everything would be!

What I'd like is to have the fields and labels be full-sized, and the
dialog be scrollable. That is, as necessary, the user could scroll the
content around inside the dialog to reveal more of the fields, instead
of wx cramming everything into one box. I've found that I can make
dialogs scrollable, but the docs indicated that this was for small
screens, which isn't my problem here. Would this still work for what I
want, or should I look elsewhere? I hope I'm making sense!

--
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 wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,
have you considered some kind of ListCtrl or Grid widget for this?
I haven't used such complex gui within a dialog sofar, but it looks
like some widget for tabular data might be useful in this case.
You can check the wxpython demo:
Redirecting...
to see the functionality of the available widgets.
hth,
   vbr

--
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 wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Hall wrote:

A list is an interesting idea--it's inherantly scrollable, after all.

Looking at the wxPython demo, I think you'll have accessibility issues
if you go down the editable ListCtrl route, and you definitely will if
you use a grid. I've never used an editable ListCtrl, so I don't know
what those accessibility issues might be or whether they'd be fixable,
but editing cells within the demo doesn't work with NVDA.

If you do create an accessible editable list control, please do share
it, especially if it's Phoenix-compatible.

I'm certainly not set on having a dialog, I just wanted something that
would block the rest of the app while it's on the screen, in case a
user decided to go messing with things without saving changes to the
record. If I can somehow show it modally, I'm not opposed to just
making a new panel and doing the database operations there instead.

A panel must be contained within a window, there is no way to show one
without. A modal dialog is exactly the right thing to use here.

···

--
James Scholes
http://twitter.com/JamesScholes