- This topic has 1 reply, 2 voices, and was last updated 15 years, 5 months ago by Support.
-
AuthorPosts
-
June 12, 2009 at 1:55 pm #33033Tugrul HelvaciParticipant
How can i find a disabled TsEdit's color ? TsSkinManager's GetActiveEditColor returns TsEdit's normal color not disabled color. I was look gd[index], ma[index] etc. but i couldn't find it.
Note: I dont want to send a message to control for find a color.
For example; just imagine that TsEdit is disabled state
…
var
ActiveColor,
DisabledColor : TColor;
begin
ActiveColor := SkinManager.GetActiveEditColor;
DisabledColor := ??
end;i was tried following;
var
R,G,B, Gray : Byte;
ActiveColor,
DisabledColor : TColor;
begin
ActiveColor := SkinManager.GetActiveEditColor;
R := GetRValue(ActiveColor);
G := GetGValue(ActiveColor);
B := GetBValue(ActiveColor);Gray := (R + G +
June 13, 2009 at 9:19 am #39575SupportKeymasterHello
Sorry for delay, I'm not always here
So, disabled edit haven't constant color, because control is alphablended.
For some skins this color will not be changed and may be calculated, but in many skins this color depended from a color of parent :
[attachment=3334:disedit.png]
So, solution depends from a your task.
Try this code for receiving average color between active edit and main skin color :CODEuses sGraphUtils, sDefaults;
Color := MixColors(SkinManager.GetActiveEditColor, SkinManager.GetGlobalColor, DefDisabledBlend);
Maybe it helps.AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)- You must be logged in to reply to this topic.