- This topic has 5 replies, 3 voices, and was last updated 15 years, 7 months ago by shadow_tj.
-
AuthorPosts
-
April 28, 2009 at 6:16 pm #32902TomParticipant
Hello
How can I get the color of the mainform, i.e. skin form color?
regards
TomApril 29, 2009 at 7:07 am #38902shadow_tjParticipantwhat do you want the skinned mainform color for ??
if you want to paint a panel with the same color of the mainform..
replace the TPanel with a TsPanel ( GeExprts tools are very usefull for that )The sPanel has a Skindata property.. when the panels are dropped on a form.. yust make the SkinSection on “NONE”
then the panel will be transparent so you see the Form colors.You can also set the skinsection to form, but must of the time you get the form color with a border.
Other options is to create a own SkinSection, where you only select the form background colors.
There are tools on the Alphaskin page to adjust the skins.
But must easiest way is to use SkinSection “None”Or is there a other thing you want the Form color ??
April 29, 2009 at 11:31 am #38904TomParticipantwhat do you want the skinned mainform color for ??if you want to paint a panel with the same color of the mainform..
replace the TPanel with a TsPanel ( GeExprts tools are very usefull for that )The sPanel has a Skindata property.. when the panels are dropped on a form.. yust make the SkinSection on “NONE”
then the panel will be transparent so you see the Form colors.You can also set the skinsection to form, but must of the time you get the form color with a border.
Other options is to create a own SkinSection, where you only select the form background colors.
There are tools on the Alphaskin page to adjust the skins.
But must easiest way is to use SkinSection “None”Or is there a other thing you want the Form color ??
I'm using a 3D rendering component to display some objects (images with reflection, coverflow style). This component has a background color property, and I would like to set this to the same color as background color of current skin. My application has the possibility to change skin, hence the request.
April 30, 2009 at 5:35 am #38917SupportKeymasterHello
You can use sSkinManager1.GetGlobalColor function.
Here you will have received a global color of current skin. But form may be textured or filled by gradient. If you want to receive an all info about background please write again and I'll help you.April 30, 2009 at 10:55 am #38940TomParticipantHelloYou can use sSkinManager1.GetGlobalColor function.
Here you will have received a global color of current skin. But form may be textured or filled by gradient. If you want to receive an all info about background please write again and I'll help you.Thanks, will have a look at it
I also think the following code might work:
CODEvar
R, G, B: Cardinal;begin
PixelCol := GetPixel(GetDC(0), screen.width -2, screen.height -2);
R := GetRValue(PixelCol);
G := GetGValue(PixelCol);
B := GetBValue(PixelCol);
form1.gui.color:= B Shl 16 Or G Shl 8 Or R;
end;I'll feed back later…
May 4, 2009 at 7:33 am #38959shadow_tjParticipantthat option may work if you got a solid color with no textures in it.
so when the background has only 1 color.But when you have that, and you only use the same skin why not grab the color combination when you run your application.
there are tools to grab colors from applications.The application i used most for getting the right color is ColorCop.
URL: http://colorcop.net/
with this tool you get a pipet to grabcolor settings from other applications.
this way you can grab the color you need and yust use that in the color property.Your way also works, except when you add a other item on position 2,2 this is very close on the position of Menu`s.
so when you add a menu to your application you will get a other color.greetings,
shadow_tj
-
AuthorPosts
- You must be logged in to reply to this topic.