Page 1 of 1
sciLexer control properties
Posted: 31 Jul 2014 20:45
by Audun Tönnesen
I've placed a sciLexer custom control in a form-window.
There are so many properties, but apart from X, Y, Height, Width and Font, the rest seem to have no effect. The long list of properties with <default> values cause a runtime-error if I try to change them.
What I'd really like, is setting word-wrap within the editor rectangle. A vertical scrollbar is ok, but not a horizontal one.
How do I set properties acdcordingly?
Posted: 1 Aug 2014 8:53
by Thomas Linder Puls
I agree that the list of properties is overwhelming, furthermore most of the properties cannot be set until the control have been shown. I think we have to find a way to limit the number of proerties in the property editor.
Anyway, after the control has been shown (for example in a show listener, or using
postAction) you can set the
wrapMode property to
sciLexer_native::sc_wrap_word.
Code: Select all
clauses
new() :-
...
generatedInitialize(),
postAction({ :-
sciLexer_clt:wrapMode := sciLexer_native::sc_wrap_word
}).
Posted: 2 Aug 2014 12:30
by Audun Tönnesen
Hm...let me just summarize: I'll have many sciLexer controls in the form-window, so I'll have to call postAction on all of them:
% the form-window.pro-file:
.....
new() :-
...
generatedInitialize(),
postAction({ :-
oneOfMyNamedSciLexerControls_ctl:wrapMode := sciLexer_native::sc_wrap_word
}),
*/...all the other named sciLexer controls inthe form
......
...... /* .
At least, this seems to work as intended when I execute app.
Am I right? (You know, with an insipient dementia I have now less trust in myself
)
Posted: 2 Aug 2014 14:31
by Audun Tönnesen
Yeah, this works fine! Thanks, Thomas.
(new() in the formwindow pro. file)
.....
..... generatedInitialize(),
CTL_LST = [hvaSkjedde_ctl, mistenkt_skade_ctl], % plus many more!
foreach CTL = list::getMember_nd(CTL_LST) do
postAction({ :-
CTL:wrapMode := sciLexer_native::sc_wrap_word
})
end foreach.