setting text color in Rich Edit

new topic     » topic index » view thread      » older message » newer message

Judith,

re: Rich Edit:
I assume you've found out that "cut" works ok in Win32Lib 0.53, but that
there's some difficulty getting user input text colorized.

Here's the best I have found, only problem is, it only works on text which
is *selected*:

in the RE example that comes with Win32Lib, in "procedure CF_onClick()",
     (which is the "change font" procedure),
comment out "setFont( RE, {font[4],font[1]} , font[2], font[3] )"
    (to remove the *effect* of the font selection dialog),
and add "setFont(RE, {Red,"Arial"}, 20, Normal)"
    (to force the font to be Red)

then, when you run it, IF YOU SELECT SOME TEXT, and click "change font", and
in that dialog just hit "ok", it will change the *selected* text to Red.  Of
course, the problem here is how to programmatically *select* the text, & I
haven't a clue how to do that.

At this point, (unless maybe someone knows how to programmatically select
text in an acceptable fashion), looks to me like what you did with your own
editor may be the better bet?

Dan

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu