|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Re: wxSTC questionsHi, Michael, Sorry to bring up this old thread, but I was away for some time with something else. -----Original Message----- >From: Michael Hieke <michael.hieke@...> >Sent: Apr 21, 2009 11:21 PM >To: wx-users@... >Subject: Re: wxSTC questions > >Igor, > >ikorot@... wrote: > >> MDIParentFrame->MDIChildFrame->View->StyledTextEditor. >> >> In theory, all events/message processing should go to view-derived class. >> And there is no canvas, as it's an editor view. >> But it simply does not have EVT_IDLE event. >> >> Or maybe I miss something? > >I don't know about the messages going to the view, as the status bar is >probably part of the MDI parent frame, and the view shouldn't really >know about it. > >Anyway, you could add the event handler to either the wxSTC, the view, >the MDI parent frame or the MDI child frame. This is as simple as adding > > void OnIdle(wxIdleEvent& event); > >to the class, connecting the event dynamically or via the message map >macros: > > EVT_IDLE(MyFrame::OnIdle) > >and implement it. My first question is: The EVT_STC_UPDATEUI event is called when wxSTC control has been created. When this hapeens I only need to display "0001:0001", however, since it goes to the handler it displays "* 0001:0001", which means that the content has been modified (star in front of the position). How do you differentiate between those 2 events? > >> Yes, I do agree here. But if I'm a quick typer, like 60-70 wpm, what >> happen with you program? > >It will update the status bar whenever there is time for it. Actually I >don't really know, it depends on so many things. Then again, when you >are busy typing 60 or 70 wpm - what's the problem with the caret >position not immediately updated in the status bar (if that should >happen at all, I don't know)? At most it will be a little out-of-sync >for a while, but it will be updated the moment you stop typing, or when >there are enough spare cycles to process idle events again. My second question is: I'm using wxSTC in Doc/View MDI app. I set up the language highlightning, but when I start typing, the color does not change. When I step through the code I see that it calls the neccessary "colorize" routine, and the text should be colorized, but it's not. Any suggestions on what might be the problem? Or at least how to debug it? I made my view the same way as in the docview sample, but trying to set breakpoint in the view OnDraw() does not produce anything as the program does not go there. Thank you. > >HTH > >-- >Michael Hieke > >_______________________________________________ >wx-users mailing list >wx-users@... >http://lists.wxwidgets.org/mailman/listinfo/wx-users --~--~---------~--~----~------------~-------~--~----~ Please read http://www.wxwidgets.org/support/mlhowto.htm before posting. To unsubscribe, send email to wx-users+unsubscribe@... or visit http://groups.google.com/group/wx-users -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |