How to change properties for hidden text?
How to change properties for hidden text?
Hi, me again
how can I change the outfit of hidden text? Without dotted underline instead of this color gray.
how can I change the outfit of hidden text? Without dotted underline instead of this color gray.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
First, I do not understand why do you need some special code or settings for hidden text, if you only have a single text style used for hidden text.
Just assign RVStyle.TextStyles[15].Color := clNavy to change its text.
OnApplyStyleColor can be used if you want to display some text with different colors, not with colors specified in Color or BackColor properties.
Something like:
This code makes all hidden text color = clNavy.
Just assign RVStyle.TextStyles[15].Color := clNavy to change its text.
OnApplyStyleColor can be used if you want to display some text with different colors, not with colors specified in Color or BackColor properties.
Something like:
Code: Select all
procedure TMyForm.MyRVStyleApplyStyleColor(Sender: TRVStyle; Canvas: TCanvas;
StyleNo: Integer; DrawState: TRVTextDrawStates; var DoDefault: Boolean);
begin
if (rvteoHidden in Sender.TextStyles[StyleNo].Options) and
not (rvtsSelected in DrawState) then begin
Canvas.Font.Color := clNavy;
Canvas.Brush.Style := bsClear;
DoDefault := False;
end;
end;
The reason why I tried out an other way is, that I can't change RVStyle.TextStyles[15].Color. I can, sure, but it has no effect. May be because of I use 'use a predefined set of styles' in my rvEdit.
So I assume that the editor is searching a style as similar as possible if I assign 'hidden' to a selected text and creates a new one if it dont' find one. If the color of RVStyle.TextStyles[15] is dark (clNavy, clGreen) perhaps it is 'enough similar' and it accepts the existing style. E.g. gray or silver is not similar > makes its own new style. I hope I could explain my problem? Sorry I know it sounds a little complicated ...
So I assume that the editor is searching a style as similar as possible if I assign 'hidden' to a selected text and creates a new one if it dont' find one. If the color of RVStyle.TextStyles[15] is dark (clNavy, clGreen) perhaps it is 'enough similar' and it accepts the existing style. E.g. gray or silver is not similar > makes its own new style. I hope I could explain my problem? Sorry I know it sounds a little complicated ...