- This topic has 5 replies, 2 voices, and was last updated 8 years, 6 months ago by Gino D.
-
AuthorPosts
-
December 8, 2015 at 1:12 pm #36785Gino DParticipant
Hi,
I have 2 TsSliders, one which has an orientation that's horizontal and one vertical. I have added the required skinsections to the skin to change the thumbs and sliders (SLIDER_ON, SLIDER_OFF, THUMB_ON, THUMB_OFF).
I would like to apply 2 different bitmaps to set the 'control borders' for each orientation (coVertical, coHorizontal), is this possible?
December 23, 2015 at 3:49 pm #54516SupportKeymasterHello! Sorry for a delay.
You can add your new section with custom name and specify this section in the sSlider1.SkinData.SkinSection property.
You tried this way?
January 7, 2016 at 2:30 pm #54565Gino DParticipant'Support' wrote:Hello! Sorry for a delay.
You can add your new section with custom name and specify this section in the sSlider1.SkinData.SkinSection property.
You tried this way?
Thank you for your reply!
I am aware of this, but the TsSlider seems to be an exception where you don't have one skinsection, but multiple fixed-name skinsections for each part of the slider (the thumb's states and the slider's states: SLIDER_ON, SLIDER_OFF, THUMB_ON, THUMB_OFF). What I need would be something like sSlider1.ThumbOn.SkinData.SkinSection, sSlider1.sliderOn.SkinData.SkinSection, sSlider1.ThumbOff.SkinData.SkinSection and sSlider1.sliderOff.SkinData.SkinSection, which currently doesn't appear to be possible at design time…
January 7, 2016 at 2:45 pm #54566Gino DParticipantTo further illustrate:
– I used the background bitmap to create a vertical line
[attachment=7524:HowItIsVertical.png]
– Because horizontal sliders use the same bitmap, the line stays vertical, resulting in this:
[attachment=7525:HowItIsHorizontal.png]
– If i could set a second bitmap for horizontal sliders, i would be able to use a horizontal line as well:
[attachment=7526:HowItShouldBe.png]
January 13, 2016 at 7:29 am #54587SupportKeymasterMaybe I not quite understand the issue.
Why you can't specify required SkinSections when needed, like this:
Code:procedure TForm1.sSlider2SliderChange(Sender: TObject);
begin
if sSlider2.SliderOn then begin
sSlider2.ThumbSection := 'THUMB_VERT_ON';
sSlider2.SkinData.SkinSection := 'SLIDER_VERT_ON';
end
else begin
sSlider2.ThumbSection := 'THUMB_VERT_OFF';
sSlider2.SkinData.SkinSection := 'SLIDER_VERT_OFF';
end;
end;You can use any skin section here…
Your suggestion for adding new properties is not bad, but such property as ThumbSection should be removed in this case?
And, SkinData is a common property for all control, which contains many special information for the control skinning, can't be removed.
May 13, 2016 at 8:18 am #55006Gino DParticipantThank you! This was the solution for me, I was not aware that the property 'ThumbSection' had been introduced (was working with an older version).
-
AuthorPosts
- You must be logged in to reply to this topic.