[Gambas-user] Editor control

Benoît Minisini gambas at ...1...
Mon Dec 14 22:39:00 CET 2009


> > Do you use Gambas 3 ? Do you use the latest revision ?
> 
> That would have been useful information to add, sorry. I tried both
> Gambas 2.18 and Gambas 3 svn (updated today).
> 
> > Editor.Flags[Editor.ShowModifiedLines] = False
> > Editor.Flags[Editor.ShowCurrentLine] = False
> >
> > Regards,
> 
> That is what I was using, sorry if I am missing something basic.
> 
> Here is what I tried, FMain has an Editor control named Editor1 and in the
> Form_Open Sub ()
>    Editor1.Text = File.Load("test.txt")
>    Editor1.Flags[Editor.ShowModifiedLines] = False
>    Editor1.Flags[Editor.ShowCurrentLine] = False
> End
> 
> I wasn't sure if I needed Editor1.Reset, but tried it.
> 
> Also I copied the Highlight example and tried to turn off
> ShowModifiedLines, still can't make it work. As soon as it loads a file
> the Editor1 background becomes white.
> 
> Thanks,
> John
> 

As for the background color, the Editor actually does not use it, it uses the 
background color defined in the highlighting style.

So: Editor1.Styles[Highlight.Background].Background = Color.Yellow

As for the flags, there are all off by default, so I don't understand why you 
want to set them off again.

Regards,

-- 
Benoît Minisini




More information about the User mailing list