[Gambas-user] Editor.Lines[0].Refresh() does not trigger custom Highlight event

Benoît Minisini gambas at ...1...
Sun Mar 10 13:44:45 CET 2013


Le 09/03/2013 20:11, Tobias Boege a écrit :
> On Sat, 09 Mar 2013, Beno?t Minisini wrote:
>> Le 09/03/2013 18:10, Tobias Boege a ?crit :
>>> Hi,
>>>
>>> the attached project shows how just for line 0, the
>>> Editor.Lines[0].Refresh() method does not force the Highlight event to kick
>>> in (if I have Editor.Highlight = Highlight.Custom set).
>>>
>>> Is there a reason or is it just a bug?
>>>
>>> Regards,
>>> Tobi
>>>
>>
>> Refresh() just triggers a GUI redraw. It has nothing to do with the
>> Highlight event, that is raised when the editor decides.
>>
>
> Alright. It looked like it did force a Highlight event with all the other
> line numbers but ok... I now get what I want by resetting Editor.Highlight
> and then Editor.Goto() one line back and forth. Not really beautiful but
> seems to work consistently.
>
> In case anyone wonders: I'm implementing kind of Editor.ShowString() and
> Replace$() for use with regular expressions. This requires highlighting the
> entire text again with a new search query. The Editor doesn't really fit my
> needs (as my hack above shows) but out of all controls it comes the most
> close to it I think...
>
> Regards,
> Tobi
>

I don't understand what you want to do exactly with Editor. Could you 
explain with more details?

-- 
Benoît Minisini




More information about the User mailing list