I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I found no GetSize() method avaiable. Any other ideas ?
What is returned from splitter.GetWindow1()? If it is None then you are correct, there is no GetSize method on a None object, but you also don't have the splitter window in a state where you can find out what size its window panes are, (because it doesn't have any.)
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I found no GetSize() method avaiable. Any other ideas ?
What is returned from splitter.GetWindow1()? If it is None then you are correct, there is no GetSize method on a None object, but you also don't have the splitter window in a state where you can find out what size its window panes are, (because it doesn't have any.)
Calling Getsize() on 2 (sub)splitterwindows just after panels are installed in the 4 panes yeilds:
(0, 0) subsplitter 1, pane 1
(50, 0) pane 2
(0, 246) subsplitter 2, pane 1
(50, 246) pane 2
I know that each pane size is about (290, 275), so the returns are total nonsense.
Any other ideas about this ?
I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I found no GetSize() method avaiable. Any other ideas ?
What is returned from splitter.GetWindow1()? If it is None then you are correct, there is no GetSize method on a None object, but you also don't have the splitter window in a state where you can find out what size its window panes are, (because it doesn't have any.)
Calling Getsize() on 2 (sub)splitterwindows just after panels are installed in the 4 panes yeilds:
(0, 0) subsplitter 1, pane 1
(50, 0) pane 2
(0, 246) subsplitter 2, pane 1
(50, 246) pane 2
I know that each pane size is about (290, 275), so the returns are total nonsense.
Any other ideas about this ?
Are you sure that the frame has been shown (and sized) at this point? If not then the splitters won't have been sized yet, and so their children havn't either. Try doing it after everything has been sized and I think you'll have very different results. (Such as with a wx.CallAfter from the frame's EVT_SIZE handler, don't forget to call evt.Skip though.)
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I'm trying to resize images to fit within panes of splitter windows.
I can't seem to get the avalable spliiterwindow's panes' sizes using GetClientSize()
on the splitter window or the panes. This works fine for frames but returns bogus values
for splitters and panels put into them. Is there another way ?
I found no GetSize() method avaiable. Any other ideas ?
What is returned from splitter.GetWindow1()? If it is None then you are correct, there is no GetSize method on a None object, but you also don't have the splitter window in a state where you can find out what size its window panes are, (because it doesn't have any.)
Calling Getsize() on 2 (sub)splitterwindows just after panels are installed in the 4 panes yeilds:
(0, 0) subsplitter 1, pane 1
(50, 0) pane 2
(0, 246) subsplitter 2, pane 1
(50, 246) pane 2
I know that each pane size is about (290, 275), so the returns are total nonsense.
Any other ideas about this ?
Are you sure that the frame has been shown (and sized) at this point? If not then the splitters won't have been sized yet, and so their children havn't either. Try doing it after everything has been sized and I think you'll have very different results. (Such as with a wx.CallAfter from the frame's EVT_SIZE handler, don't forget to call evt.Skip though.)
Calling just after the app frame's Show call produces:
Tomorrow I'll add a EVT_SIZE handler and use CallAfter to see what happens.
I know there's a way to force this event programatically, but it's late and I can't think of it.