[Gambas-user] Editor Control (gb.qt4.ext) - Some questions.
Benoît Minisini
gambas at ...1...
Mon Feb 6 20:58:05 CET 2012
Le 05/02/2012 03:55, Ian Roper a écrit :
> In the Editor control from gb.qt4.ext
>
> # Context
> When reviewing text read from a file in an Editor Control.
>
>
>
> # Highlighting
> When MyEditorControl.Highlight attribute is set to 'Normal', the
> 'end-of-line' ( gb.crlf ) character is displayed as a musical note
> symbol ?
gb.CrLf is not the end of line. It is gb.Lf only. Maybe the musical note
is the gb.Cr character at the end of the line?
> I have tried various fonts but the symbol is the same for each font.
> If you use another highlight value ( Gambas, SQL...) then the symbol is
> NOT displayed.
>
> Q: Is there any way to disable this symbol displaying in 'Normal' mode ?
>
> # Select All
> When you call the editor function to MyEditorControl.SelectAll in code,
> it selects all the text lines but dose not highlight the code.
> All the text is selected and you can copy to clipboard and paste as
> required.
> If you do this manually by using the mouse - this works ok - all text is
> highlighted.
> If you use the shortcut keys Ctrl-A - this works ok- all text is
> highlighted.
>
> Q: Is there a parameter I can set to highlight all the text when
> 'MyEditorControl.SelectAll' is actioned ?
Mmm. Strange, as normally SelectAll() method and hitting CTRL+A should
call exactly the same code internally. I will check... Can you send me
an example of whay you do exactly?
>
> # Wordwrap
> There is no parameter I can set to 'word-wrap' text if there is no
> embedded 'end-of-line' character.
>
> Q: Is it possible to add this functionality as a standard control
> parameter ?
Not at the moment. It is very complex to implement it in the Editor control.
>
>
> # LineNumbering
>
> The MyEditorControl.ShowLineNumbers functionality for Editor controls
> cannot be accessed ( Read Only)
> In the context Help is says: "Set this flag to display line numbers" but
> it is read-only.
>
> Q: How can you set this flag ?
> Q: Is it possible to be able to set this to True/False to show line
> numbers in the control ?
It works like that:
MyEditor.Flags[Editor.ShowLineNumbers] = True
A bit weird - I admit I should have used real boolean properties!
Regards,
--
Benoît Minisini
More information about the User
mailing list