overRapped screen

I declared 2 stc control with FlexGridSizer

before adding stc to GridSizer, self.stc1 and self.stc2 is already
displayed which are overrapped.
I declared like this

self.stc1 = STC(self)
self.stc2 = STC(self)

self.Autosizer = wx.FlexGridSizer(rows=1, cols=2)
self.Autosizer.Add(e,1, wx.EXPAND)
self.Fit()

how can I avoid this problem.

Wonjun, Choi

I declared 2 stc control with FlexGridSizer

before adding stc to GridSizer, self.stc1 and self.stc2 is already

displayed which are overrapped.

I declared like this

self.stc1 = STC(self)

self.stc2 = STC(self)

self.Autosizer = wx.FlexGridSizer(rows=1, cols=2)

self.Autosizer.Add(e,1, wx.EXPAND)

self.Fit()

how can I avoid this problem.

Wonjun, Choi

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

···

2011/10/17 Wonjun, Choi wonjunchoi001@gmail.com

Hi Wonjun Choi,

I declared 2 stc control with FlexGridSizer

before adding stc to GridSizer, self.stc1 and self.stc2 is already
displayed which are overrapped.

it is overlapped:-)

I declared like this

self.stc1 = STC(self)
self.stc2 = STC(self)

self.Autosizer = wx.FlexGridSizer(rows=1, cols=2)
self.Autosizer.Add(e,1, wx.EXPAND)

what is "e" in the above?

Do you add stc1 and stc2 to Autosizer somewhere in your code?

e.g. you should have:

self.Autosizer.Add(self.stc1, 1, wx.EXPAND)
self.Autosizer.Add(self.stc2, 1, wx.EXPAND)

Werner

···

On 10/17/2011 10:20 AM, Wonjun, Choi wrote:

I did but I can see the controls without GridSizer.

···

2011/10/17 werner wbruhin@free.fr

Hi Wonjun Choi,

On 10/17/2011 10:20 AM, Wonjun, Choi wrote:

I declared 2 stc control with FlexGridSizer

before adding stc to GridSizer, self.stc1 and self.stc2 is already

displayed which are overrapped.

it is overlapped:-)

I declared like this

self.stc1 = STC(self)

self.stc2 = STC(self)

self.Autosizer = wx.FlexGridSizer(rows=1, cols=2)

self.Autosizer.Add(e,1, wx.EXPAND)

what is “e” in the above?

Do you add stc1 and stc2 to Autosizer somewhere in your code?

e.g. you should have:

self.Autosizer.Add(self.stc1, 1, wx.EXPAND)

self.Autosizer.Add(self.stc2, 1, wx.EXPAND)

Werner

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

The window's default size handler is where its sizer is used to automatically do the layout, so if there is no size event after the items have been added to a sizer and SetSizer has been called then there will be no automatic layout and the items will be seen in their default positions and sizes. Usually calling Layout() yourself after the items have been created and added to the sizer will work in those cases.

···

On 10/17/11 2:07 AM, 최원준 wrote:

2011/10/17 werner <wbruhin@free.fr <mailto:wbruhin@free.fr>>

    Hi Wonjun Choi,

    On 10/17/2011 10:20 AM, Wonjun, Choi wrote:

        I declared 2 stc control with FlexGridSizer

        before adding stc to GridSizer, self.stc1 and self.stc2 is already
        displayed which are overrapped.

    it is overlapped:-)

        I declared like this

        self.stc1 = STC(self)
        self.stc2 = STC(self)

        self.Autosizer = wx.FlexGridSizer(rows=1, cols=2)
        self.Autosizer.Add(e,1, wx.EXPAND)

    what is "e" in the above?

    Do you add stc1 and stc2 to Autosizer somewhere in your code?

    e.g. you should have:

    self.Autosizer.Add(self.stc1, 1, wx.EXPAND)
    self.Autosizer.Add(self.stc2, 1, wx.EXPAND)

I did but I can see the controls without GridSizer.

--
Robin Dunn
Software Craftsman

I used Layout() method.

btw, I am wondering what Fit() method is doing.
when I used Fit() instead of Layout(), the size of all control was changed.

Wonjun, Choi

···

2011/10/18 Robin Dunn robin@alldunn.com

On 10/17/11 2:07 AM, 최원준 wrote:

2011/10/17 werner <wbruhin@free.fr mailto:wbruhin@free.fr>

Hi Wonjun Choi,





On 10/17/2011 10:20 AM, Wonjun, Choi wrote:



    I declared 2 stc control with FlexGridSizer



    before adding stc to GridSizer, self.stc1 and self.stc2 is already

    displayed which are overrapped.



it is overlapped:-)



    I declared like this



    self.stc1 = STC(self)

    self.stc2 = STC(self)



    self.Autosizer = wx.FlexGridSizer(rows=1, cols=2)

    self.Autosizer.Add(e,1, wx.EXPAND)



what is "e" in the above?



Do you add stc1 and stc2 to Autosizer somewhere in your code?



e.g. you should have:



self.Autosizer.Add(self.stc1, 1, wx.EXPAND)

self.Autosizer.Add(self.stc2, 1, wx.EXPAND)

I did but I can see the controls without GridSizer.

The window’s default size handler is where its sizer is used to automatically do the layout, so if there is no size event after the items have been added to a sizer and SetSizer has been called then there will be no automatic layout and the items will be seen in their default positions and sizes. Usually calling Layout() yourself after the items have been created and added to the sizer will work in those cases.

Robin Dunn

Software Craftsman

http://wxPython.org

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

...

I used Layout() method.
btw, I am wondering what Fit() method is doing.

http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.Window.html?highlight=fit#Fit

Werner

···

On 10/18/2011 10:52 AM, 최원준 wrote: