Hi,
Is there any way to resize the image on the button to resize with the button size?
for example if the button width and height is changed the image adjust to the button size!
Thanks
image on button resize
Re: image on button resize
Here is a small sample program that shows how to do this with DCPUSHBUTTONXP.
In the sample, SCALE 3.0 will increase the size of the original bitmap by 3X.
I found a problem with the class in which resizing was not working correctly, so you need to make a small change to _DCXBUTT.PRG first.
At line 1629, comment out the following code as shown :
/*
IF ::mouseMode > 0
RETURN nil
ENDIF
*/
Then rebuild DCLIPX.DLL by running BUILD20.bat or BUILD19_SL1.bat.
Here is the sample program:
In the sample, SCALE 3.0 will increase the size of the original bitmap by 3X.
I found a problem with the class in which resizing was not working correctly, so you need to make a small change to _DCXBUTT.PRG first.
At line 1629, comment out the following code as shown :
/*
IF ::mouseMode > 0
RETURN nil
ENDIF
*/
Then rebuild DCLIPX.DLL by running BUILD20.bat or BUILD19_SL1.bat.
Here is the sample program:
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], GetOptions
@ 0,0 DCPUSHBUTTONXP ;
SIZE 100, 100 PIXEL ;
BITMAP '\exp20\bitmaps\Bugicon.bmp' ;
SCALE 3.0 ;
RESIZE DCGUI_RESIZE_RESIZEONLY
DCGETOPTIONS RESIZE
DCREAD GUI FIT OPTIONS GetOptions
RETURN nil
PROC appsys ; return
The eXpress train is coming - and it has more cars.