Page 1 of 1

DCPUSHBUTTONXP Color of Button

Posted: Mon Feb 11, 2013 7:52 pm
by GeneB
The attached code creates an XP style button, but it is white.
The mouse color and click color are correct.
Can someone please tell me what I am missing?
Thanks,
GeneB

Code: Select all

#INCLUDE  "dcdialog.ch"

PROC appsys ; return

FUNCTION MAIN()
LOCAL GetList[0]

@ 6.0,11 DCPUSHBUTTONXP ;
      SIZE 40, 5 ;
      CAPTION 'Inventory' ;
      GRADIENT 3.0 ;
      COLOR {255,255,0},{ 51, 51,255} ;
      MOUSECOLOR {255,255,0},{  0, 51,255} ;
      CLICKCOLOR {255,255,0},{  0,  0,221} ;
      BORDERCOLOR {204,212,204} ;
      RADIUS 10 ;
      FONT '16.Arial' ;
      TOOLTIP 'Go To Inventory Menu' ;
      ACTION {|| nil }

DCREAD GUI FIT TITLE 'Test DCPUSHBUTTONXP'
RETURN nil

Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 2:34 am
by skiman
Hi,

Try first without gradient.

Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 6:52 am
by GeneB
With the above code if I remove the gradient the button is black.
The code I am using is from ButtPicker.exe

Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 7:27 am
by GeneB
With this code I get the gradient but lose the 'mouse over' color change

Code: Select all

#INCLUDE  "dcdialog.ch"

PROC appsys ; return

FUNCTION MAIN()
LOCAL oConfig, GetList[0]

oConfig := DC_XbpPushButtonXpConfig():new()
oConfig:gradientStyle := 5
oConfig:gradientStep  := 3

@ 6.0,11 DCPUSHBUTTONXP ;
      SIZE 40, 5 ;
      CAPTION 'Inventory' ;
      COLOR  GRA_CLR_YELLOW,GRA_CLR_BLUE   ;
      MOUSECOLOR {255,255,0},{  0,  0,221} ;
      CLICKCOLOR {255,255,0},{  0,  0,221} ;
      BORDERCOLOR {204,212,204} ;
      GRADIENT 3 ;
      STATIC     ;
      RADIUS 10 ;
      FONT '16.Arial' ;
      TOOLTIP 'Go To Inventory Menu' ;
      ACTION {|| nil }

DCREAD GUI FIT TITLE 'Test DCPUSHBUTTONXP'
RETURN nil

Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 8:08 am
by rdonnay
I think you found a bug. The below code works for me.

Code: Select all

#INCLUDE  "dcdialog.ch"

PROC appsys ; return

FUNCTION MAIN()
LOCAL GetList[0]

@ 6.0,11 DCPUSHBUTTONXP ;
      SIZE 40, 5 ;
      CAPTION 'Inventory' ;
      GRADIENT 3.0 ;
      COLOR GRA_CLR_YELLOW, { 51,51,255 } ;
      MOUSECOLOR {255,255,0},{  0, 51,255} ;
      CLICKCOLOR {255,255,0},{  0,  0,221} ;
      BORDERCOLOR {204,212,204} ;
      RADIUS 10 ;
      FONT '16.Arial' ;
      TOOLTIP 'Go To Inventory Menu' ;
      ACTION {|| nil }

DCREAD GUI FIT TITLE 'Test DCPUSHBUTTONXP'
RETURN nil


Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 8:17 am
by GeneB
51,51,255

Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 8:22 am
by rdonnay
I re-edited my first posting. Please go back and read it.

Re: DCPUSHBUTTONXP Color of Button

Posted: Tue Feb 12, 2013 8:38 am
by GeneB
Works !!
"Muchas gracias noch einmal"
GeneB