Update on quest for autosizing grid cells

Hi all,

Update and a question re scrolled panel scrollbars not appearing.

Robin if you are reading this, I didn't in the end follow your advice of
modifying the grid as with my level of inexperience and lack being able to
interpret docs, and of talent as a programmer that would have been beyond my
ken.

I have however had reasonable success with my first method

I made each row for my 'pseudo grid' out of expando texts and stuck them on a
sizer on a panel with no borders

A page of rows then gets stuck onto another panel -( scrolled.ScrolledPanel),
with a 1 pixel gap between each, so the whole thing ends up looking like a
grid anyway.

As I type, the boxes all size properly (except at the moment back the other
way when I delete some text, but I think that is fixable as maybe I just have
to put another _adjust linked to the delete key + layout again).

If I autofill the cells with text of varying lengh and the pseudogrid size
exceeds the height of the window, then the scrollbars on the edge of the
scrolled panel do not appear, however if I re-size the window even a
miniscule fraction, then this triggers something and the scrollbars appear,
and the whole thing scolls ok.

So Question is, any way to force the scroll bars to appear if you
programmatically enlarge the scrolled panel?

Thanks in anticipation.

Richard
w

Sounds like calling SendSizeEvent after the filling of the cells might work?

Cheers, Frank

···

2007/2/12, Richard Terry <rterry@internode.on.net>:
> If I autofill the cells with text of varying lengh and the pseudogrid size

exceeds the height of the window, then the scrollbars on the edge of the
scrolled panel do not appear, however if I re-size the window even a
miniscule fraction, then this triggers something and the scrollbars appear,
and the whole thing scolls ok.

Richard Terry wrote:

If I autofill the cells with text of varying lengh and the pseudogrid size exceeds the height of the window, then the scrollbars on the edge of the scrolled panel do not appear, however if I re-size the window even a miniscule fraction, then this triggers something and the scrollbars appear, and the whole thing scolls ok.

So Question is, any way to force the scroll bars to appear if you programmatically enlarge the scrolled panel?

You can (re)set the virtual size. Or you can just send a size event so the default EVT_SIZE handler will do it for you. There is a SendSizeEvent helper function for this.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!