1. jeff hersey
  2. PowerBuilder
  3. Wednesday, 10 October 2018 16:55 PM UTC

 

Can I change the background colour of a command button placed in a datawindow?

 

 

Thanks
Jeff

 

--- FYI ---

Windows 7

Powerbuilder 2017 r3

Postgresql DB 9.5

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 10 October 2018 17:46 PM UTC
  2. PowerBuilder
  3. # 1

Hi Jeff;

   No .. neither a CB Control or a DW based CB will allow you to change it's colour. Even in the DW Painter, you can set the CB's background colour and see it in the "design" pane yet, in the "preview" pane it stays grey.

   The there are a few workarounds though to this restriction ...

  1. Use a either a PictureButton control or use the DW CB's "picture file" property. Then at run time, change the image (solid colour) to change the CB's background colour at run time.
  2. You can also use a StaticText object in the DW Painter. Add a MouseDown & MouseUp event to the DC. Then on the MouseDown/Up change the Text object's "border" to simulate depressing a CB. Now with the text object, you can change the background colour at will.

HTH

Regards ... Chris

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.