Page 1 of 1

Tslider transparency

Posted: Sat Jul 28, 2007 1:30 am
by reinaldocrespo
Hi.

Working with Tslider control for the first time. I'm placing this control on a bitmaped dialog where all controls are transparent but the Tslider. Can't find how to make it transparent. Is this possible at all?

Code: Select all


	DEFINE DIALOG ::oDlg NAME "VoiceRecorder" OF ::oOwner BRUSH ::oBrush  TRANSPARENT
...
	REDEFINE SLIDER ::oSlider VAR nVar OF ::oDlg ID 400 HORIZONTAL LEFT DIRECTION EXACT ;
               RANGE 0, 200 MARKS 7
	::oSlider:bChange := { || ::PlaySpeed( Eval( ::oSlider:bSetGet() ) ) }
	::oSlider:lTransparent := .t.
	::oSlider:nClrPane := ::oDlg:nClrPane

Thank you,


Reinaldo.

Posted: Sat Jul 28, 2007 8:53 am
by Antonio Linares
Reinaldo,

Please try ::oSlider:SetBrush( ::oDlg:oBrush )

Posted: Sat Jul 28, 2007 2:57 pm
by reinaldocrespo
Antonio;

Thank you for the reply.

It did not work. No change.

Here is the new code:

Code: Select all

	DEFINE BRUSH ::oBrush RESOURCE "GradientHoriz"
	DEFINE DIALOG ::oDlg NAME "VoiceRecorder" OF ::oOwner BRUSH ::oBrush  TRANSPARENT
...
	REDEFINE SLIDER ::oSlider VAR nVar OF ::oDlg ID 400 HORIZONTAL LEFT DIRECTION EXACT ;
               RANGE 0, 200 MARKS 7 
	::oSlider:bChange := { || ::PlaySpeed( Eval( ::oSlider:bSetGet() ) ) }
	::oSlider:lTransparent := .t.
	::oSlider:SetBrush( ::oDlg:oBrush )

Any other ideas?



Reinaldo.