ExpandoTextCtrl & EVT_LAYOUT_NEEDED

Larry Bates larry.bates at websafe.com
Wed Sep 26 05:44:37 PDT 2007


Andrea Gavana wrote:
> On 9/26/07, Larry Bates wrote:
>> Robin Dunn wrote:
>>> Larry Bates wrote:
>>>> I'm having problems getting this working correctly.  When
>>>> ExpandoTextCtrl increases its vertical height (as it should) it is not
>>>> resizing/reloacting the two listctrls that are below it.  I've tried
>>>>
>>>> def OnRefit(self, evt):
>>>>     self.Fit()
>>>>
>>>>
>>>> def OnRefit(self, evt):
>>>>     self.Fit()
>>>>     self.Layout()
>>>>
>>>> def OnRefit(self, evt):
>>>>     self.Layout()
>>>>     self.Fit()
>>> What is self?  What is the relationship of self to the ExpandoTextCtrl?
>>>  What is the structure of the sizers?  (A small runnable sample would
>>> have answered all these questions and more...)
>>>
>>>> What is odd is that if I just grab the lower right corner of the
>>>> window and resize it even a little, everything works like a charm.
>>> This is a sure sign that a Layout will take care of the problem, but the
>>> how and the where will depend on the answers to the above questions
>>> (and/or a runnable sample.)
>>>
>> Sorry, I'm running Python version of wxWindows so that code is "runnable".
> 
> "Runnable" in the wxPython community means: "a piece of code, as short
> as possible, that we can actually copy and paste in our preferred
> editor and run without further modification". See, for example:
> 
> http://wiki.wxpython.org/MakingSampleApps
> 
>> self is Python's way of referencing this (I think that is how C does it).
> 
> You must be joking :-D
> I bet Robin knows what "self" is used for in Python... he is the
> creator of wxPython ;-)
> 
> Andrea.
> 
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.alice.it/infinity77/

No joking here, he is one that asked "What is self?" I thought my question was 
so simple that a "runnable" example wouldn't be necessary (the solution was to 
add self.Refresh() to the frame that gets executed when the ExpandoCtrl needs 
resizing).  Next time I'll try to post a runnable example that demonstrates the 
problem..  Since this is maybe my 2nd wxPython program, I'm still learning a lot 
and I didn't have any idea who was asking.

-Larry





More information about the wxpython-users mailing list