语言

Menu
Sites
Language
Is it possible to make bar of the Slider transparent?

Hi,

I want to customize Slider control and make its bar transparent.  I tried to do this using SetBarBackgroundColor() and SetBarColor() methods, but without result. The bar isn’t transparent anyway.

Thanks!

响应

3 回复
Alex Dem

Hi,
1) I was able to create transparent Slider via Native UI Builder , Property->Background Style->BACKGROUND_STYLE_NONE

2) I was unable to create transparent Slider control programatically:
Slider* pSlider1 = new Slider();
pSlider1->Construct(Rectangle(0, 200, GetClientAreaBounds().width, 200), BACKGROUND_STYLE_NONE, false, 0, 100,GROUP_STYLE_NONE);
AddControl(pSlider1);

Looks like a bug.
Alexey.

Alex Dem

Hi,
Sorry, my prev post was about another issue regarding slider.
But it is impossible to set transparent color of slider bar .
There are remarks regardings SetBarColor, SetBarBackgroundColor methods in help:
Remarks  The method ignores the alpha value of the color parameter and sets the alpha value to 255.
Alexey.

make custm bar as I explianed in other topic