On Wed, Sep 3, 2008 at 5:49 AM, John Labenski <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 2, 2008 at 11:12 PM, Duncan Cross <[EMAIL PROTECTED]> wrote:
>> Hi List,
>>
>> Could anyone help me with getting brace matching to work (i.e. when
>> the text cursor is over a brace, highlight both the brace and its
>> matching twin blue, unless the brace is mismatched, in which case
>> highlight it red) for a wxStyledTextCtrl control? It seems like it
>> should be obvious, but I can't seem to find this information anywhere.
>> What change(s) would you make to the editor.wx.lua sample script to do
>> this? (I know that it must be possible since wxLuaEditor supports it.)
>>
>
> The wxLuaEditor does it on the C++ side, but perhaps it can be
> translated to Lua.
>
> See:
>
> http://wxcode.cvs.sourceforge.net/wxcode/wxCode/components/wxstedit/src/stedit.cpp?view=markup
>
>  156     EVT_STC_UPDATEUI         (wxID_ANY, wxSTEditor::OnSTCUpdateUI)
>
>  340 void wxSTEditor::OnSTCUpdateUI(wxStyledTextEvent &event)
>
>  1874 void wxSTEditor::DoBraceMatch()
>
> and
>
> 1792 bool wxSTEditor::DoFindMatchingBracePosition(
>
>
> Hope this helps,
>    John

Thanks John. I'll see how I get on with this and will report back if I
succeed. It seems odd that code block folding is easy to add in but
not this, but that's a quirk of how wxStyedTextCtrl works rather than
anything wxLua is responsible for I expect.

-Duncan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to