Make TsPanel transparent/translucent?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33394
    aroberts
    Participant

    I had emailed Serge this question last week, but he is probably very busy at the moment, preparing another release. Perhaps someone else knows the answer and would be kind enough to provide it:

    I have been trying to use a TsPanel as a semi-transparent panel according to the method described in the AC Forum:

    In the SkinManager CommonSections:

    [EMPTYITEM]
    PaintingTransparency = 100
    HotPaintingTransparency = 100

    Then selecting EMPTYITEM as the SkinSection.

    It doesn't work as described. I have tried various values for the parms, but with no success. This solution was posted quite a while ago, so is there a newer, better way of doing that with the latest version?

    Thanks for any help.

    #41037
    Support
    Keymaster

    Hello
    You must use TRANSPARENCY and HOTTRANSPARENCY (all reserved words may be found in sSkinProps.pas)
    Also I must say that empty item exists already in all skins. 'CHECKBOX' section will be empty and transparent always and you can use this section.

    #41316
    Alfatester
    Participant

    QUOTE (Support @ Nov 11 2009, 07:42 AM) <{POST_SNAPBACK}>
    Hello
    You must use TRANSPARENCY and HOTTRANSPARENCY (all reserved words may be found in sSkinProps.pas)
    Also I must say that empty item exists already in all skins. 'CHECKBOX' section will be empty and transparent always and you can use this section.

    Tried following:
    SkinManager.CommonSections.Add('[EMPTYITEM]');
    SkinManager.CommonSections.Add('TRANSPARENCY = 50');
    SkinManager.CommonSections.Add('HOTTRANSPARENCY = 50');
    sPanel1.SkinData.SkinSection := 'EMPTYITEM';

    Nothing helped.

    Do you have sample of working code?

    #41336
    Alfatester
    Participant

    Solved:

    Code works in case of lines without spaces:

    SkinManager.CommonSections.Add('[EMPTYITEM]');
    SkinManager.CommonSections.Add('TRANSPARENCY=50');
    SkinManager.CommonSections.Add('HOTTRANSPARENCY=50');
    sPanel1.SkinData.SkinSection := 'EMPTYITEM';

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