DCPUSHBUTTONXP Color of Button

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

DCPUSHBUTTONXP Color of Button

#1 Post 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

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: DCPUSHBUTTONXP Color of Button

#2 Post by skiman »

Hi,

Try first without gradient.
Best regards,

Chris.
www.aboservice.be

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCPUSHBUTTONXP Color of Button

#3 Post by GeneB »

With the above code if I remove the gradient the button is black.
The code I am using is from ButtPicker.exe

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCPUSHBUTTONXP Color of Button

#4 Post 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

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCPUSHBUTTONXP Color of Button

#5 Post 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

The eXpress train is coming - and it has more cars.

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCPUSHBUTTONXP Color of Button

#6 Post by GeneB »

51,51,255

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCPUSHBUTTONXP Color of Button

#7 Post by rdonnay »

I re-edited my first posting. Please go back and read it.
The eXpress train is coming - and it has more cars.

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCPUSHBUTTONXP Color of Button

#8 Post by GeneB »

Works !!
"Muchas gracias noch einmal"
GeneB

Post Reply