Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Error: GUI TAB extra style Index rejected

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Error: GUI TAB extra style Index rejected
#11828
Posted by: PeterJ 2007-09-14 01:32:52
the extra style INDEX leads to an error in GUICREATE: GUI 

/*
GUIBEGIN

STRING ListStrings
My string
Another string
One more
DEND

STRING TabStrings
One
Two
Three
DEND


WINDOW , 91, 221, 197, 199, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , TAB example
	FONT 8, 400, MS Shell Dlg
	TAB 5, 3, 187, 108, SINGLELINE|RIGHTJUSTIFY|NOFOCUS, INDEX, MyTab, , TabStrings
DEND
GUIEND
*/

mytab = "One"	/* Initially select this label. */
twocheck1 = 1	/* Initially check this box. */
myoldtab = "One"



OPTIONS "C_CALL LABELCHECK"

LIBRARY rexxgui

guierr = "SYNTAX"
guiheading = 1


guicreatewindow()
addtabctls()
guisetctlplacement(,,,,,,'NORMAL')

again:
DO FOREVER
	guigetmsg()
	CATCH SYNTAX
		CONDITION('M')
		SIGNAL again
	CATCH HALT
	FINALLY
		guidestroywindow()
END
RETURN


wm_click_onepush:
	guisay("Button clicked")
	RETURN

wm_selchange_mytab:
	/* Get the selected label's text (ie, "One", "Two" or "Three"). */
	guigetctlvalue("MyTab")
	removetabctls()

	/* Now add the set of controls for the new TAB label. */
	addtabctls()

	/* Save the current TAB label as the previous label too. */
	myoldtab = mytab

	RETURN

removetabctls:
	/* Which label was previously selected? */
	SELECT myoldtab
		WHEN "One" THEN DO
			guigetctlvalue("OneEntry")
			guigetctlvalue("OnePush")
			guiremovectl("OneEntry")
			guiremovectl("OnePush")
		END
		WHEN "Two" THEN DO
			guigetctlvalue("TwoCheck1")
			guigetctlvalue("TwoCheck2")
			guigetctlvalue("TwoCheck3")
			guigetctlvalue("TwoCheck4")
			guiremovectl("TwoCheck1")
			guiremovectl("TwoCheck2")
			guiremovectl("TwoCheck3")
			guiremovectl("TwoCheck4")
		END
		WHEN "Three" THEN DO
			guigetctlvalue("ThreeList")
			guiremovectl("ThreeList")
		END
		OTHERWISE	/* If no label was previously selected, MyOldTab = "MYOLDTAB" */
	END

addtabctls:
	/* Which label is selected? */
	SELECT mytab
		WHEN "One" THEN DO
			guiaddctl("ENTRY 10,20,176,14, TABSTOP, CLIENTEDGE|QUIET, OneEntry")
			guiaddctl("PUSH 76,40,50,16, DEFAULT|TABSTOP, , OnePush, , Ok")
		END
		WHEN "Two" THEN DO
			guiaddctl("CHECK 10,24,50,14, AUTO, QUIET, TwoCheck1, , Option 1")
			guiaddctl("CHECK 70,24,50,14, AUTO, QUIET, TwoCheck2, , Option 2")
			guiaddctl("CHECK 10,44,50,14, AUTO, QUIET, TwoCheck3, , Option 3")
			guiaddctl("CHECK 70,44,50,14, AUTO, QUIET, TwoCheck4, , Option 4")

		END
		WHEN "Three" THEN DO
			guiaddctl("LIST 10,20,176,90, TABS|BORDER, CLIENTEDGE|QUIET, ThreeList,, ListStrings")
		END
	END
	RETURN
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥880.00 ·
 
 
¥1,390.00 ·
 
 
¥1,380.00 ·
 
 
¥287.00 ·
 
 
¥918.00 ·
 
 
¥860.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0