LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
guicreatewindow('NORMAL')
guisendmsg("MyView", "SETEXTENDEDLISTVIEWSTYLE", "CLICK|FULLROW", "CLICK|FULLROW")
DO i = 1 TO 3
mycolumn.!width = 33
SELECT i
WHEN 1 THEN mycolumn.!text = "Name"
WHEN 2 THEN mycolumn.!text = "Occupation"
OTHERWISE mycolumn.!text = "Christmas present"
END
mycolumn.!state = "LEFT"
mycolumn.!subitem = i
guiaddctltext("MyView", "MyColumn", 1)
END
myitem.!item = 1
myitem.!subitem = 1
myitem.!text = "Mike S."
myitem.!state = "SELECT"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 2
myitem.!text = "Causing havoc at a bank"
myitem.!state = ""
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 3
myitem.!text = "A new database"
guiaddctltext("MyView", "MyItem")
myitem.!item = 2
myitem.!subitem = 1
myitem.!text = "Mestrini"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 2
myitem.!text = "Finding bugs"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 3
myitem.!text = "More bugs"
guiaddctltext("MyView", "MyItem")
myitem.!item = 3
myitem.!subitem = 1
myitem.!text = "Jeff G"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 2
myitem.!text = "Developing Reginald 24/7"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 3
myitem.!text = "Fame and fortune???"
guiaddctltext("MyView", "MyItem")
myitem.!item = 4
myitem.!subitem = 1
myitem.!text = "PeterJ"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 2
myitem.!text = "Asking for new features"
guiaddctltext("MyView", "MyItem")
myitem.!subitem = 3
myitem.!text = "Already received"
guiaddctltext("MyView", "MyItem")
giftitem = 3
again:
DO FOREVER
guigetmsg()
CATCH SYNTAX
CONDITION('M')
SIGNAL again
CATCH HALT
FINALLY
guidestroywindow()
END
RETURN
wm_rclick_myview:
guisay("Clicked the right mouse button on column" myview "of item" myview.1)
RETURN
wm_click_myview:
guisay("Clicked the left mouse button on column" myview "of item" myview.1)
RETURN
wm_columnclick_myview:
guisay("User clicked upon column" myview)
RETURN
wm_click_bad:
guisendmsg("MyView", "DELETEITEM", 1)
guisendmsg("MyView", "DELETEITEM", 1)
guisendmsg("MyView", "DELETEITEM", 2)
giftitem = 1
RETURN
wm_click_newgift:
guisendmsg("MyView", "SETITEMTEXT", giftitem, 3, "A life")
RETURN
wm_click_showsel:
guisendmsg("MyView", "GETITEMCOUNT")
count = guisignal
DO i = 1 TO count
guisendmsg("MyView", "GETITEMSTATE", i, "SELECT")
IF guisignal == "SELECT" THEN guisay("Item" i "is selected.")
END
RETURN |