- This topic has 7 replies, 3 voices, and was last updated 3 years, 4 months ago by Saeidd2016.
-
AuthorPosts
-
August 17, 2011 at 4:02 pm #34731OldGrumpyParticipant
Hi there,
is there a way to set a custom folor for the font of a third party control which is a TCustomTreeView descendant? Setting MyTree.Font.Color does not work, and because it is a third party control, there is no MyTree.Skindata property available. Any idea how to solve this? Thanks in advance!
August 19, 2011 at 8:32 am #46449SupportKeymasterCustomization of color is possible in components from the AlphaControls package only.
I'm thinking about a solution for other controls, but I haven't good ideas at moment.
August 21, 2011 at 5:33 pm #46508OldGrumpyParticipantI solved it for this particular case by just editing the skin file and changing the color values for the EDIT section. It is only a small application so it is not a problem. π A really awesome solution would be: making the skin data writable at runtime so the application can change its appearance any time π (No, not loading another skin, just manipulating some bits of it)
September 5, 2011 at 9:37 am #46570SupportKeymasterHello
It's possible to change an any section in the current loaded skin in run-time :
Code:procedure TForm1.sButton1Click(Sender: TObject);
const
SectionName = 'EDIT';
var
SkinIndex : integer;
begin
SkinIndex := sSkinManager1.GetSkinIndex(SectionName);
if SkinIndex >= 0 then sSkinManager1.gd[SkinIndex].Color := clYellow;
if SkinIndex >= 0 then sSkinManager1.gd[SkinIndex].HotColor := clYellow;
sSkinManager1.RepaintForms(False);
end;'OldGrumpy' wrote:I solved it for this particular case by just editing the skin file and changing the color values for the EDIT section. It is only a small application so it is not a problem. π A really awesome solution would be: making the skin data writable at runtime so the application can change its appearance any time π (No, not loading another skin, just manipulating some bits of it)
July 1, 2021 at 3:33 pm #70163Saeidd2016ParticipantHello support. The above posts are very old. In new version of AlphaControls is there a way to set a custom font color of a third party control?
July 1, 2021 at 5:46 pm #70167SupportKeymasterHello!
The ChangeControlColors procedure is declared in the sVCLUtils unit:procedure ChangeControlColors(AControl: TControl; AFontColor, AColor: TColor);
If color value is clNone then default color will be used there.
I hope it helps.July 1, 2021 at 6:23 pm #70172Saeidd2016ParticipantHello!
The ChangeControlColors procedure is declared in the sVCLUtils unit:procedure ChangeControlColors(AControl: TControl; AFontColor, AColor: TColor);
If color value is clNone then default color will be used there.
I hope it helps.Thanks, For VirtualTreeView it doesn’t work.
July 1, 2021 at 6:32 pm #70175Saeidd2016ParticipantThanks, For VirtualTreeView it doesnβt work.
Excuse me it works correctly.
-
AuthorPosts
- You must be logged in to reply to this topic.