ScrolledWindow inside a Dialog not behaving as expected
Hi All,
My aim is to use a dialog in which the user has to associate 'numbers'
to 'things' in a list of unknown length. When the list becomes too long
the 'Cancel' and 'OK' buttons at the bottom become invisible with the
remaining part of the list. To prevent this I try to use a
ScrolledWindow containing the list inside a Dialog. Although I found
some clues how to do this, I cannot get it right: the remaining part of
the list together with the buttons still disappears, I don't get scroll
bars. Btw, there is also a strange (at least to me) segmentation fault.
I'll attach a stripped down version.
Any help will be greatly appreciated. Regards, Igor
ScrolledWindow inside a Dialog not behaving as expected
Hi All,
My aim is to use a dialog in which the user has to associate 'numbers'
to 'things' in a list of unknown length. When the list becomes too long
the 'Cancel' and 'OK' buttons at the bottom become invisible with the
remaining part of the list. To prevent this I try to use a
ScrolledWindow containing the list inside a Dialog. Although I found
some clues how to do this, I cannot get it right: the remaining part of
the list together with the buttons still disappears, I don't get scroll
bars. Btw, there is also a strange (at least to me) segmentation fault.
I'll attach a stripped down version.
Any help will be greatly appreciated. Regards, Igor
Your parenting was not correct, i.e. all the statictext and combobox controls should be children of scrolled and you need to return scrolled instead of sizer.
See attached, instead of using PySimpleApp I used to WIT (run it and press ctrl-alt-i and check out the wiki for the widget inspection tool) which helped me seeing these problems.
I didn't see the segmentation fault but it could be due to this parenting.
Thanks very much for your answer and corrections. Now it works the way I want it to, no more segmentation faults. I see where I went wrong. Hm, I’ve been a bit stupid. Thanks too for suggesting the inspection tool, I’ll use that first when problems occur. Regards, Igor
···
On Tuesday, March 27, 2012 5:23:15 PM UTC+2, werner wrote:
Hi Igor,
On 27/03/2012 17:05, Igor Hoveijn wrote:
ScrolledWindow inside a Dialog not behaving as expected
Hi All,
My aim is to use a dialog in which the user has to associate ‘numbers’
to ‘things’ in a list of unknown length. When the list becomes too long
the ‘Cancel’ and ‘OK’ buttons at the bottom become invisible with the
remaining part of the list. To prevent this I try to use a
ScrolledWindow containing the list inside a Dialog. Although I found
some clues how to do this, I cannot get it right: the remaining part of
the list together with the buttons still disappears, I don’t get scroll
bars. Btw, there is also a strange (at least to me) segmentation fault.
I’ll attach a stripped down version.
Any help will be greatly appreciated. Regards, Igor
Your parenting was not correct, i.e. all the statictext and combobox
controls should be children of scrolled and you need to return scrolled
instead of sizer.
See attached, instead of using PySimpleApp I used to WIT (run it and
press ctrl-alt-i and check out the wiki for the widget inspection tool)
which helped me seeing these problems.
I didn’t see the segmentation fault but it could be due to this parenting.