Guidance
指路人
g.yi.org
Software / Reginald / Examples / treeimage / treeimage.rex

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
/*
GUIBEGIN
WINDOW , 46, 129, 400, 200, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , TREE images
	FONT 8, 400, MS Shell Dlg
	TREE 3, 4, 143, 135, LINES|ROOT, INDEX, MyTree, , MyTreeItems
DEND
GUIEND
*/

/* An example of putting operating system bitmap images in an imagelist,
 * and using that imagelist with a TREE control.
 */

LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1

/* Initialize MyTreeItems variable */
mytreeitems.1 = 'Parent 1 | 1'
mytreeitems.2 = 'Parent 2 | 1|HIDE'
mytreeitems.3 = 'Parent 3 | 1|HIDE'

mytreeitems.1.1 = 'Child 1 | 2'
mytreeitems.1.2 = 'Child 2 | 2'

mytreeitems.2.1 = 'Child 1 | 2'

mytreeitems.3.1 = 'Child 1 | 2'

guicreatewindow('NORMAL')

again:
DO FOREVER
	guigetmsg()
	CATCH SYNTAX
			CONDITION('M')
			SIGNAL again
	CATCH HALT
	FINALLY
		/* Free the image list */
		guiimagelist('MyImages', 'FREE')
		guidestroywindow()
END
RETURN

/* Called by Reginald after GuiCreateWindow creates the window,
 * and all of the controls in it, but before the window is
 * displayed. Here, we would do any special manipulation of the
 * window/controls.
 */
wm_initdialog:
	/* Create an image list, and store the handle in "MyImages" */
	var.0 = 2  /* The number of images in the image list */
	var.1 = "1_topic" /* The first image. Note that the .bmp is optional on the name */
	var.2 = "2_topic" /* The second image */
	guiimagelist('MyImages', , 'Var')

	/* Give the TREE control my image list */
	guisendmsg('MyTree', 'SETIMAGELIST', , myimages)
	RETURN
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2017-11-22  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:49:30