Search Results

Search found 3 results on 1 pages for 'wxstyledtextctrl'.

Page 1/1 | 1 

  • How come BraceMatch() doesn't work when a lexer is set in wxStyledTextCtrl?

    - by George Edison
    I have the following chunk of C++ code that gets called when } is pressed: int iCurPos = GetCurrentPos(); InsertText(iCurPos,wxT("}")); int iPos = BraceMatch(iCurPos); This works fine (iPos gets the position of the matching brace) except when I call SetLexer(...) beforehand. Then it returns -1? How can I get it to work? Edit: I should point out that the above code is being called from the EVT_KEY_DOWN handler in a wxStyledTextCtrl-derived class.

    Read the article

  • Is there a way to be notified when the user makes changes in a wxStyledTextCtrl?

    - by George Edison
    I have a wxWidgets application that has a wxStyledTextCtrl. But for the life of me, I cannot figure out how to get notified of modification events. I have the following code: void CMainWindow::OnDocumentModified(wxStyledTextEvent & event) { wxString msg; msg << event.GetModificationType(); wxMessageBox(msg); } This gets called for EVT_STC_MODIFIED. When I run the application and press a key, the message box displays 1040 and 8209. When I call SetText the same two messages are displayed. How can I differentiate between user events and programmatically-generated events?

    Read the article

  • Example of configuring wxStyledTextCtrl/wxScintilla control as code editor for custom language

    - by Greg
    How do you enable actions like Goto line number Find(/Replace) There don't appear to be default triggers for these actions. There are a bunch of methods on the control, but I'm missing the first step of how to get the 'events' that would trigger these. For instance, how does one hook ctrl+f or F3/Alt+F3 in the control and make them do a find? Should I be looking at each key using EVT_STC_KEY? Would also like any examples of using this control with Custom language definition (say something similar to C++, but not C++) Auto completion (basic keywords to start, or including variables)

    Read the article

1