how can I print the whole text from STC?

hello.

I added several STC control to scrolledpanel. and I made print button
which is for printing each content of STC in scrolledpanel. but when I
printed it, it prints the only text which is that I can see on the
screen. in order to print the whole text of STC, I have to scroll
until the end of the last STC. I don't know how to fix this.

Wonjun, Choi

scrollpanel.py (2.31 KB)

I don't see any printing code in that sample application...

···

On 1/15/12 11:33 PM, Wonjun, Choi wrote:

hello.

I added several STC control to scrolledpanel. and I made print button
which is for printing each content of STC in scrolledpanel. but when I
printed it, it prints the only text which is that I can see on the
screen. in order to print the whole text of STC, I have to scroll
until the end of the last STC. I don't know how to fix this.

--
Robin Dunn
Software Craftsman

I could print the right lexer from attached sample.
but I still have a problem on my project source. there is no different code.

I added the control to dictionary.

text = wx.StaticText(self.scrolled_panel)
editor = STC(self.scrolled_panel)
self.ctrlsDict[editor.GetId()] = text.GetId()

and I got the lexer like below.
but all of the stc that I cannot see on the frame returns 0, I don’t know why.

def OnTest(self, event):
    for item in self.ctrlsDict:
        control = wx.FindWindowById(item)
        if isinstance(control, wx.stc.StyledTextCtrl):
            print control.GetLexer()

Wonjun, Choi

this issue is solved from you thanks

Wonjun Choi