I want to use the View control for the first time and am hitting a problem/bug. Here's my test code
LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
guicreatewindow()
rc = post_create_window()
guisetctlvalue()
guisetctlplacement(,,,,,,'NORMAL')
again:
DO FOREVER
guigetmsg()
IF EXISTS('GuiObject') == 0 THEN DO
IF EXISTS('GuiSignal') THEN DO
END
END
ELSE DO
IF EXISTS('GuiSignal') == 0 THEN DROP (guiobject)
ELSE SELECT guiobject
WHEN 0 THEN NOP
OTHERWISE
END
END
CATCH SYNTAX
CONDITION()
SIGNAL again
CATCH HALT
FINALLY
guidestroywindow()
END
RETURN
post_create_window:
DO i = 1 TO 4
SELECT i
WHEN 1 THEN
DO
mycolumn.!width = 40
mycolumn.!text = "Module/section"
mycolumn.!state = "LEFT"
END
WHEN 2 THEN
DO
mycolumn.!width = 20
mycolumn.!text = "Start"
mycolumn.!state = "LEFT"
END
WHEN 3 THEN
DO
mycolumn.!width = 20
mycolumn.!text = "End"
mycolumn.!state = "LEFT"
END
OTHERWISE
DO
mycolumn.!width = 20
mycolumn.!text = "Time taken (secs)"
mycolumn.!state = "RIGHT"
END
END
mycolumn.!subitem = i
guiaddctltext("trace_view", "MyColumn", 1)
END
RETURN 0
wm_click_ok_button:
trace_event_type.0 = 5
DO i = 1 TO 5
trace_text.i = 'Trace_text 'i
trace_event_type.i = 'Trace_event_type 'i
END
DO i = 1 TO trace_event_type.0
myitem.!item = i
myitem.!subitem = 1
myitem.!text = trace_text.i
myitem.!subitem = 2
myitem.!text = trace_event_type.i
guiaddctltext("trace_View", "MyItem")
END
RETURN 0
Run the script, press the button - I don't see anything being added to the view control. I'm assuming I can do what I'm trying to ?
I'll carry on experimenting in the meantime |