ButtonXP bitmap location
ButtonXP bitmap location
eXpress build 1.9 253
I was trying to put my bitmap in the center of the XP button by doing this in the DC_XbpPushButtonXPConfig code:
oConfig1:alignBitmap := XBPALIGN_HCENTER + XBPALIGN_VCENTER
but it is not working for me
Is this wrong?
Jeanne
I was trying to put my bitmap in the center of the XP button by doing this in the DC_XbpPushButtonXPConfig code:
oConfig1:alignBitmap := XBPALIGN_HCENTER + XBPALIGN_VCENTER
but it is not working for me
Is this wrong?
Jeanne
Re: ButtonXP bitmap location
Show me more code because that looks right to me.
The eXpress train is coming - and it has more cars.
Re: ButtonXP bitmap location
oConfig2 := DC_XbpPushButtonXPConfig():new()
oConfig2:fgColorMouse := COLOR_DARKGREEN
oConfig2:bgColorMouse := COLOR_ORANGE
oConfig2:fgColor := COLOR_DARKGREEN
oConfig2:bgColor := COLOR_DARKGREEN
oConfig2:fgColorSelected := GRA_CLR_GREEN
oConfig2:bgColorSelected := COLOR_ICEGREEN
oConfig2:fgColorClick := COLOR_DARKGREEN
oConfig2:bgColorClick := COLOR_ICEGREEN
oConfig2:gradientStep := 10
oConfig2:gradientReverse := .T.
oConfig2:radius := 12
oConfig2:outline := .T.
oConfig2:font := cSayFont
oConfig2:mouseOverFont := cGetFont
oConfig2:mouseOverScale := 1.1
oConfig2:bitmapOffset := 1
oConfig2:bitmapScale := 1
oConfig2:alignBitmap := XBPALIGN_HCENTER +XBPALIGN_VCENTER //XBPALIGN_HCENTER +
oConfig2:borderColor := COLOR_BLUE
oConfig2:fgColorMouse := COLOR_DARKGREEN
oConfig2:bgColorMouse := COLOR_ORANGE
oConfig2:fgColor := COLOR_DARKGREEN
oConfig2:bgColor := COLOR_DARKGREEN
oConfig2:fgColorSelected := GRA_CLR_GREEN
oConfig2:bgColorSelected := COLOR_ICEGREEN
oConfig2:fgColorClick := COLOR_DARKGREEN
oConfig2:bgColorClick := COLOR_ICEGREEN
oConfig2:gradientStep := 10
oConfig2:gradientReverse := .T.
oConfig2:radius := 12
oConfig2:outline := .T.
oConfig2:font := cSayFont
oConfig2:mouseOverFont := cGetFont
oConfig2:mouseOverScale := 1.1
oConfig2:bitmapOffset := 1
oConfig2:bitmapScale := 1
oConfig2:alignBitmap := XBPALIGN_HCENTER +XBPALIGN_VCENTER //XBPALIGN_HCENTER +
oConfig2:borderColor := COLOR_BLUE
Re: ButtonXP bitmap location
Roger,
May be I need to put together a small test to see how this works in it.
Jeanne
May be I need to put together a small test to see how this works in it.
Jeanne
Re: ButtonXP bitmap location
Roger,
Because my app is a touch screen I used your sample TouchSrc as my base. I modified the Numpad.prg to show my issue with the bitmaps not being centered.
When I do not use the RESIZE options the bitmap does stay in the center but when I add the RESIZE and maximize the window the bitmap goes to the bottom left part of the button.
I really need this to work so we can release this soon.
Jeanne
Because my app is a touch screen I used your sample TouchSrc as my base. I modified the Numpad.prg to show my issue with the bitmaps not being centered.
When I do not use the RESIZE options the bitmap does stay in the center but when I add the RESIZE and maximize the window the bitmap goes to the bottom left part of the button.
I really need this to work so we can release this soon.
Jeanne
- Attachments
-
- Numpad.zip
- Numpad.prg
- (3.15 KiB) Downloaded 957 times
Re: ButtonXP bitmap location
Roger,
I was wondering if you had a chance to look at this?
thanks
Jeanne
I was wondering if you had a chance to look at this?
thanks
Jeanne
Re: ButtonXP bitmap location
Sorry, I got distracted and missed it. Will do it now.
The eXpress train is coming - and it has more cars.
Re: ButtonXP bitmap location
Jeanne -
The below code better explains the problem.
Compile and run it to see what I mean. You need to resize the window to see the problem.
It is in the resizing logic of the DC_XbpPushButtonXP() class.
I consider this a bug.
Apparently, nobody has attempted to resize one of these buttons before.
I will have to work on a fix for this and give you an update.
Roger
The below code better explains the problem.
Compile and run it to see what I mean. You need to resize the window to see the problem.
It is in the resizing logic of the DC_XbpPushButtonXP() class.
I consider this a bug.
Apparently, nobody has attempted to resize one of these buttons before.
I will have to work on a fix for this and give you an update.
Roger
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], oConfig1
oConfig1 := DC_XbpPushButtonXPConfig():new()
oConfig1:gradientStep := 10
oConfig1:gradientReverse := .T.
oConfig1:radius := 12
oConfig1:outline := .T.
oConfig1:font := '16.Arial Bold'
oConfig1:mouseOverFont := '16.Arial Bold'
oConfig1:mouseOverScale := 1.1
oConfig1:bitmapOffset := 15
oConfig1:bitmapScale := 1
oConfig1:alignBitmap := XBPALIGN_HCENTER +XBPALIGN_VCENTER
oConfig1:borderColor := GRA_CLR_YELLOW
@ 50, 90 DCPUSHBUTTON CAPTION 2108 FONT '16.Arial Bold' SIZE 80,80 PIXEL ;
RESIZE DCGUI_RESIZE_AUTORESIZE_SCALEFONT CONFIG oConfig1
@ 200, 90 DCPUSHBUTTON CAPTION 2108 FONT '16.Arial Bold' SIZE 200, 200 PIXEL ;
RESIZE DCGUI_RESIZE_AUTORESIZE_SCALEFONT CONFIG oConfig1
DCGETOPTIONS RESIZE
DCREAD GUI FIT OPTIONS GetOptions
RETURN nil
PROC appsys ; return
The eXpress train is coming - and it has more cars.
Re: ButtonXP bitmap location
Roger,
Any luck on fixing this? Looks like I will have to release my app with the bitmaps not getting centered.
Jeanne
Any luck on fixing this? Looks like I will have to release my app with the bitmaps not getting centered.
Jeanne