Code example

Below is the sample code for resizing a user object. The code for resizing a window is similar.

//declears the instance variable for the user object
eon_appeon_resize  ieon_resize

//initializes in the constructor event of the user object
//(if it is window, initializes in the open event of the window)
ieon_resize = create eon_appeon_resize
// registers all of the controls contained in this user object
ieon_resize.of_init( this, true)
//enables font resizing and resizes with the width
ieon_resize.of_fontresize( true, 2)
//enables datawindow resizing and resizes with the width
ieon_resize.of_zoom( true, 2)
//changes the datawindow resize behavior by keeping x and y coordinates unchanged, 
//and scaling to the right edge and to the bottom of the user object container.
ieon_resize.of_setflag( dw_1, '0044') 
//keeps the cb_1 size unchanged, and also keeps its relative position unchanged 
//which means the distances from the right edge and from the bottom remain the same.
ieon_resize.of_setflag( cb_1, '2222') 

//defines the resize event for the user object, event ID is set to pbm_size
//Resizes all of the controls contained in the user object
ieon_resize.of_resize( this, newwidth, newheight, true)

//destroys the user object in the destructor event
Destroy  ieon_resize