TsClassSkinData ????? Help

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #35563
    wesley bobato
    Participant

    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;

    #49790
    DarrenB
    Participant

    Hi,

    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 πŸ™‚

    #49791
    wesley bobato
    Participant

    Thanks For Your Answer I'll analyze the code and answer ja Him Again

    Thank you.

    #49792
    wesley bobato
    Participant

    Thanks 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;

    #55838
    Larsic
    Participant
    Quote:
    TempColor := formMainScreen.sSkinManager1.gd[formMainScreen.sPanelTitleBar.SkinData.SkinIndex].FontColor[2];

    ΠŸΠΎΠ΄ΡΠΊΠ°ΠΆΠΈΡ‚Π΅, ΠΊΠ°ΠΊ это Π·Π°ΠΏΠΈΡΠ°Ρ‚ΡŒ для CB6?

    #55855
    Support
    Keymaster
    'Larsic' wrote:

    ΠŸΠΎΠ΄ΡΠΊΠ°ΠΆΠΈΡ‚Π΅, ΠΊΠ°ΠΊ это Π·Π°ΠΏΠΈΡΠ°Ρ‚ΡŒ для CB6?

    Если Ρ‚ΠΎΡ‡ΠΊΠΈ Π·Π°ΠΌΠ΅Π½ΠΈΡ‚ΡŒ Π½Π° '->', Π° ':=' Π½Π° '=', Ρ€Π°Π·Π²Π΅ Π½Π΅ компилируСтся?

    #55874
    Larsic
    Participant
    'Support' wrote:
    Если Ρ‚ΠΎΡ‡ΠΊΠΈ Π·Π°ΠΌΠ΅Π½ΠΈΡ‚ΡŒ Π½Π° '->', Π° ':=' Π½Π° '=', Ρ€Π°Π·Π²Π΅ Π½Π΅ компилируСтся?

    Если Π±Ρ‹!..

    Π’ΠΎΡ‚ здСсь Π±Ρ‹Π» ΠΊΠΎΠ³Π΄Π°-Ρ‚ΠΎ ΠΏΡ€ΠΈΠΌΠ΅Ρ€ ΠΏΡ€ΠΈΠ²Π΅Π΄Π΅Π½.

    Из Π½Π΅Π³ΠΎ аналогичная строка (Π΄Π°ΠΆΠ΅ ΠΏΠΎΠΏΡ€ΠΎΡ‰Π΅): sSkinManager1->gd[SectionIndex]->GradientData = NewGradient;

    ΠΏΡ€ΠΈΠ²ΠΎΠ΄ΠΈΡ‚ ΠΊ ошибкС: [C++ Error] Unit.cpp(540): E2288 Pointer to structure required on left side of -> or ->*

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.