Page 1 of 1

Buttons over Bitmaps problem

Posted: Wed Feb 15, 2017 4:16 am
by c-tec
Hello,
I have a problem with pushbuttons on a bitmap. When I use the bitmap as parent then the button only get visible when I move the mouse over the buttons, they are invisible when creating the dialog. They are vanishing again on some actions. Also statics make problems. What can I do to keep the elements on top of the bitmap ?
regards
Rudolf




Code: Select all

     @ 1,0 DCSTATIC TYPE XBPSTATIC_TYPE_BITMAP  OBJECT oVarPad:oStaticBG PREEVAL {|o|o:autoSize := .t.} SIZE 800,700 PIXEL ID "STATICBG"


     oVarPad:oBmpBG := xbpBitmap():new():create()
     DCBITMAP oVarPad:oBmpBG PARENT oVarPad:oStaticBG
     oVarPad:oBmpBG:loadfile("pad.png")

     @ 27,15    DCPUSHBUTTONXP CONFIG oSys:oCfgButton  CAPTION "F1 = Speichern" size 20,2 OBJECT oBt1 ACTION {||}  PARENT oVarPad:oStaticBG 
     @ 27,_NCOL DCPUSHBUTTONXP CONFIG oSys:oCfgButton  CAPTION "F2 = Anzeige"   size 20,2 OBJECT oBt2 ACTION {||}  PARENT oVarPad:oStaticBG 
     @ 27,_NCOL DCPUSHBUTTONXP CONFIG oSys:oCfgButton  CAPTION "F3 = Reset"     size 20,2 OBJECT oBt3 ACTION {||}  PARENT oVarPad:oStaticBG 
     @ 27,_NCOL DCPUSHBUTTONXP CONFIG oSys:oCfgButton  CAPTION "ESC = Abbruch"  size 20,2 OBJECT oBt4 ACTION {||}  PARENT oVarPad:oStaticBG 

Re: Buttons over Bitmaps problem

Posted: Wed Feb 15, 2017 8:41 am
by Tom
Don't use DCBITMAP. Use the XbpBitmap-Object as the caption of the static:

Code: Select all

oVarPad:oBmpBG := xbpBitmap():new():create()
oVarPad:oBmpBG:loadfile("pad.png")

@ 1,0 DCSTATIC TYPE XBPSTATIC_TYPE_BITMAP  OBJECT oVarPad:oStaticBG PREEVAL {|o|o:autoSize := .t.} SIZE 800,700 PIXEL ID "STATICBG" CAPTION oVarPad:oBmpBG

Re: Buttons over Bitmaps problem

Posted: Thu Feb 16, 2017 6:53 am
by c-tec
Hello Tom,
thank you , works now, attached the screenshot of the perfect working result.
regards
Rudolf

Re: Buttons over Bitmaps problem

Posted: Fri Feb 17, 2017 6:09 pm
by unixkd
Hi Tom

Is there any way to make the STATIC on which the bitmap is displayed RAISED or RECCESSD ?

Thanks.

Joe