RzPageControl - Font color of tabsheet's captions

Components on the Raize Panels palette: panels, group bars, page controls, splitters, toolbars, status bars, group boxes, etc.

RzPageControl - Font color of tabsheet's captions

Postby gkraemer » Wed May 25, 2011 6:39 am

Hello Ray,

I use a RzPageControl and I want to allow the user to change the color of the tabsheets for better differentiation.
The problem is: When I select a color like clNavy for the tabsheet then the caption isn't readable anymore because the caption's font color is clBlack as defined in the TextColors property of the page control.
Changing the RzTabSheet's Font.Color property changes the color of the captions of the components on the tabsheet but not the color of the caption of the tabsheet itself. It remains black.
The RzPageControl's UseColoredTabs property is set to true.
Is there a possibility to change the Font.Color of the caption of a RzTabSheet (for each tabsheet separately, not for the whole RzPageControl)?

Thanks in advance
Guenter
gkraemer
 
Posts: 2
Joined:
Wed May 25, 2011 6:05 am

Re: RzPageControl - Font color of tabsheet's captions

Postby Raize Support » Thu May 26, 2011 2:21 am

Hi Guenter,

The TextColors property of the TRzPageControl allows you to control the font color of the selected tab as well as all unselected and disabled tabs.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm

Re: RzPageControl - Font color of tabsheet's captions

Postby gkraemer » Tue May 31, 2011 7:58 am

Hi Ray,

I have already tried to solve my problem with the TextColors property. But the problem is: A user has three tabs with colors of clNavy, clYellow and clRed and the TRzPageControl has a font color of clBlack for the unselected tabs. Then he chooses the red tab and the caption of the yellow tab is very good readable. But the caption of the dark blue tab isn't.
I think, my problem could only be solved if the TRzTabSheet had own properties for the caption's font colors.
Perhaps you can take this into account for a coming release?

Guenter
gkraemer
 
Posts: 2
Joined:
Wed May 25, 2011 6:05 am

Re: RzPageControl - Font color of tabsheet's captions

Postby Raize Support » Fri Jun 03, 2011 5:42 pm

We'll consider it. Another option would be to use a muted blue, red, and yellow tab color, which would allow the contrast between font and background colors to be consistent across all tabs.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm

Re: RzPageControl - Font color of tabsheet's captions

Postby JonRobertson » Sun Jun 14, 2015 5:15 pm

I'm wondering if anything was implemented to support different tabs using a different font color on the tab itself.

The utility that I've written runs scripts against a set of databases. A tab is created for the query results. Tabs start with a white color and are changed to green if the script was successful and red if the script failed. The black text looks fine on white but is barely readable on green and red. I'd prefer the text on the green and red tabs to be white, but obviously white text on a white background won't work for the tabs that have not been processed yet.

Thanks
JonRobertson
 
Posts: 28
Joined:
Thu Sep 15, 2011 12:08 am

Re: RzPageControl - Font color of tabsheet's captions

Postby Raize Support » Mon Jun 15, 2015 3:29 am

You can change the text color used for individual tabs by handling the OnGetTextColor event for the TRzPageControl. For example,

Code: Select all
procedure TForm18.RzPageControl1GetTextColor(Sender: TObject; ATabIndex: Integer; AStyle: TRzTextStyle;
  var AColor: TColor; var Handled: Boolean);
begin
  if ATabIndex = 0 then
  begin
    AColor := clWhite;
    Handled := True;
  end;
end;


The above event handler changes the text of the first tab to clWhite.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm


Return to Panels

Who is online

Users browsing this forum: No registered users and 1 guest

cron