Layoutmanager() will react on "resize".
eXpress++ has its own layout manager.
If you look at DCSLIDE.CH, you will see that there is a RESIZE clause.
The resize clause can be any of the following or your own code block:
Code: Select all
#define DCGUI_RESIZE_BLOCK {|x,y,o|{o:currentSize()[1]+x,o:currentSize()[2]+y}}
#define DCGUI_REPOS_BLOCK {|x,y,o|{o:currentPos()[1]+x,o:currentPos()[2]+y}}
#define DCGUI_REPOSX_BLOCK {|x,y,o|{o:currentPos()[1]+x,o:currentPos()[2]}}
#define DCGUI_REPOSY_BLOCK {|x,y,o|{o:currentPos()[1],o:currentPos()[2]+y}}
#define DCGUI_RESIZEX_BLOCK {|x,y,o|{o:currentSize()[1]+x,o:currentSize()[2]}}
#define DCGUI_RESIZEY_BLOCK {|x,y,o|{o:currentSize()[1],o:currentSize()[2]+y}}
#define DCGUI_REPOS_CENTER_BLOCK {|x,y,o|{(o:setParent():currentSize()[1]-o:currentSize()[1])/2,(o:setParent():currentSize()[2]-o:currentSize()[2])/2}}
#define DCGUI_REPOS_CENTER_X_BLOCK {|x,y,o|{(o:setParent():currentSize()[1]-o:currentSize()[1])/2,o:currentPos()[2]}}
#define DCGUI_REPOS_CENTER_Y_BLOCK {|x,y,o|{o:currentPos()[1],(o:setParent():currentSize()[2]-o:currentSize()[2])/2}}
#define DCGUI_RESIZE_AUTO_BLOCK {|x,y,o,x1,y1,x2,y2|{x1*x2,y1*y2}}
#define DCGUI_REPOS_AUTO_BLOCK {|x,y,o,x1,y1,x2,y2|{x1*x2,y1*y2}}
#define DCGUI_RESIZE_RESIZEONLY { nil, DCGUI_RESIZE_BLOCK, .f. }
#define DCGUI_RESIZE_REPOSONLY { DCGUI_REPOS_BLOCK, nil, .f. }
#define DCGUI_RESIZE_REPOSONLY_X { DCGUI_REPOSX_BLOCK, nil, .f. }
#define DCGUI_RESIZE_REPOSONLY_Y { DCGUI_REPOSY_BLOCK, nil, .f. }
#define DCGUI_RESIZE_RESIZEONLY_X { nil, DCGUI_RESIZEX_BLOCK, .f. }
#define DCGUI_RESIZE_RESIZEONLY_Y { nil, DCGUI_RESIZEY_BLOCK, .f. }
#define DCGUI_RESIZE_BOTH { nil, DCGUI_RESIZE_BLOCK, .f. }
#define DCGUI_REPOS_BOTH { DCGUI_REPOS_BLOCK, nil, .f. }
#define DCGUI_RESIZE_REPOS { DCGUI_REPOS_BLOCK, DCGUI_RESIZE_BLOCK, .f. }
#define DCGUI_RESIZE_NONE { nil, nil, .f. }
#define DCGUI_RESIZE_CENTER { DCGUI_REPOS_CENTER_BLOCK, nil, .f. }
#define DCGUI_RESIZE_CENTERONLY_X { DCGUI_REPOS_CENTER_X_BLOCK, nil, .f. }
#define DCGUI_RESIZE_CENTERONLY_Y { DCGUI_REPOS_CENTER_Y_BLOCK, nil, .f. }
#define DCGUI_RESIZE_REPOSY_RESIZEX { DCGUI_REPOSY_BLOCK, DCGUI_RESIZEX_BLOCK, .f. }
#define DCGUI_RESIZE_REPOSX_RESIZEY { DCGUI_REPOSX_BLOCK, DCGUI_RESIZEY_BLOCK, .f. }
#define DCGUI_RESIZE_RESIZEX_REPOSY { DCGUI_REPOSY_BLOCK, DCGUI_RESIZEX_BLOCK, .f. }
#define DCGUI_RESIZE_RESIZEY_REPOSX { DCGUI_REPOSX_BLOCK, DCGUI_RESIZEY_BLOCK, .f. }
#define DCGUI_RESIZE_AUTORESIZE { DCGUI_REPOS_AUTO_BLOCK, DCGUI_RESIZE_AUTO_BLOCK, .f. }
#define DCGUI_RESIZE_AUTORESIZE_SCALEFONT { DCGUI_REPOS_AUTO_BLOCK, DCGUI_RESIZE_AUTO_BLOCK, .t. }
Example:
Code: Select all
@ 350,0 DCSLIDE SIZE 500,30 ;
ORIENTATION XBPPRN_ORIENT_LANDSCAPE ;
RANGE 0, 255 ;
SCOPE 100, 185 ;
ColorCHANNEL GRA_CLR_RED ;
ColorSCOPE GRA_CLR_YELLOW ;
ColorTHUMB GRA_CLR_CYAN ;
FREQUENCY 5 ;
TRACK {|a,b,o| nRed := a, ShowRGB( nRed, nGreen, nBlue, @oStatic) } ;
RESIZE DCGUI_RESIZE_RESIZEONLY_X // resize horizontally when parent resizes