- This topic has 6 replies, 4 voices, and was last updated 7 years, 11 months ago by Larsic.
-
AuthorPosts
-
January 6, 2013 at 6:10 pm #35563wesley bobatoParticipant
Hello Guys Could someone help me access the Property
SkinData Through Class TsSpeedButton
Below follows an Example of How I'm Doing.
Thank you for your attention.
var
I: Integer;
begin
for I := 0 to ComponentCount -1 do
begin
if Components is TsSpeedButton then
TsSpeedButton(Components).SkinData.CustomColor := False ?????
end;
January 6, 2013 at 7:38 pm #49790DarrenBParticipantHi,
I will try but I do not know exactly what you want to do…I ran your code on a form with 3 speed buttons but it did not seem to do anything so I am uncertain.
in my app I sometimes use things like
var
TempColor : TColor
TempColor := formMainScreen.sSkinManager1.gd
[formMainScreen.sPanelTitleBar.SkinData.SkinIndex].FontColor[2];
to get colors of items used in skins…can you adapt this?
are you familiar with the FAQ entry on the main page which helped me a lot on this?
Quote:Where can I get the information on a control color and its other characteristics, such as sBitBtn1?
The TsSkinManager component has a specified gd : TsGeneralDataArray property, where each item is
TsGeneralData = record
ParentClass : string;
ClassName : string;
Color : TColor;
FontColor : array [1..5] of integer;
HotFontColor : array [1..5] of integer;
ReservedBoolean : boolean;
Transparency : integer;
GradientPercent : integer;
GradientData : string;
GradientArray : TsGradArray;
ImagePercent : integer;
ShowFocus : boolean;
FadingEnabled : boolean;
FadingIntervalIn : integer;
FadingIntervalOut : integer;
FadingIterations : integer;
HotColor : TColor;
HotTransparency : integer;
HotGradientPercent : integer;
HotGradientData : string;
HotGradientArray : TsGradArray;
HotImagePercent : integer;
…
end;
Use SkinData.SkinIndex property to get access to the properties of a certain control.
Below are a couple of examples of coloring in ordinary and active states:
sSkinManager1.gd[sBitBtn1.SkinData.SkinIndex].Color
sSkinManager1.gd[sBitBtn1.SkinData.SkinIndex].HotColor
Besides, you can get information on a certain skin item, if the SkinIndex is not known. For this purpose use the following function – sSkinManager1.GetSkinIndex(SkinSection : string) : integer;
The name of a required SkinSection is transferred into it as a parameter (all standard SkinSections are listed in the sSkinProp.pas file).
hope it helps…not sure what u want to do yet π
January 6, 2013 at 8:57 pm #49791wesley bobatoParticipantThanks For Your Answer I'll analyze the code and answer ja Him Again
Thank you.
January 6, 2013 at 9:08 pm #49792wesley bobatoParticipantThanks I restarted Delphi and he just did not stop me SkinData Property Access Controls
I do not know what happened I just rebooted and put the following code compiler compile conseguio but was giving error thank you for your attention a big hug.
var
I: Integer;
begin
for i: = 0 to -1 of ComponentCount
begin
if Components is then TsSpeedButton
TsSpeedButton (Components ). SkinData.SkinSection: ='';
end;
end;
December 7, 2016 at 10:24 am #55838LarsicParticipantQuote:TempColor := formMainScreen.sSkinManager1.gd[formMainScreen.sPanelTitleBar.SkinData.SkinIndex].FontColor[2];ΠΠΎΠ΄ΡΠΊΠ°ΠΆΠΈΡΠ΅, ΠΊΠ°ΠΊ ΡΡΠΎ Π·Π°ΠΏΠΈΡΠ°ΡΡ Π΄Π»Ρ CB6?
December 8, 2016 at 4:56 pm #55855SupportKeymaster'Larsic' wrote:ΠΠΎΠ΄ΡΠΊΠ°ΠΆΠΈΡΠ΅, ΠΊΠ°ΠΊ ΡΡΠΎ Π·Π°ΠΏΠΈΡΠ°ΡΡ Π΄Π»Ρ CB6?
ΠΡΠ»ΠΈ ΡΠΎΡΠΊΠΈ Π·Π°ΠΌΠ΅Π½ΠΈΡΡ Π½Π° '->', Π° ':=' Π½Π° '=', ΡΠ°Π·Π²Π΅ Π½Π΅ ΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡΡΠ΅ΡΡΡ?
December 9, 2016 at 9:13 am #55874LarsicParticipant'Support' wrote:ΠΡΠ»ΠΈ ΡΠΎΡΠΊΠΈ Π·Π°ΠΌΠ΅Π½ΠΈΡΡ Π½Π° '->', Π° ':=' Π½Π° '=', ΡΠ°Π·Π²Π΅ Π½Π΅ ΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡΡΠ΅ΡΡΡ?ΠΡΠ»ΠΈ Π±Ρ!..
ΠΠΎΡ Π·Π΄Π΅ΡΡ Π±ΡΠ» ΠΊΠΎΠ³Π΄Π°-ΡΠΎ ΠΏΡΠΈΠΌΠ΅Ρ ΠΏΡΠΈΠ²Π΅Π΄Π΅Π½.
ΠΠ· Π½Π΅Π³ΠΎ Π°Π½Π°Π»ΠΎΠ³ΠΈΡΠ½Π°Ρ ΡΡΡΠΎΠΊΠ° (Π΄Π°ΠΆΠ΅ ΠΏΠΎΠΏΡΠΎΡΠ΅): sSkinManager1->gd[SectionIndex]->GradientData = NewGradient;
ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΡ ΠΊ ΠΎΡΠΈΠ±ΠΊΠ΅: [C++ Error] Unit.cpp(540): E2288 Pointer to structure required on left side of -> or ->*
-
AuthorPosts
- You must be logged in to reply to this topic.