List Change Event

new topic     » topic index » view thread      » older message » newer message

Derek,

Shouldn't addItem(aList,anItem) trigger a w32HChange event for a List?

The code below demonstrates the problem I'm having. I'm trying to keep
a list box showing the last item added, but...

--  code generated by Win32Lib IDE v0.18.20
 
include Win32lib.ew
without warning

--------------------------------------------------------------------------------
--  Window Window1
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 167, 195,
0, 0 )
constant List2 = createEx( List, "List2", Window1, 4, 4, 148, 120, 0, 0 )
constant bttn_AddItem = createEx( PushButton, "Add Item", Window1, 36, 132, 88,
28, 0, 0 )
---------------------------------------------------------
--------------------------------------------------------------------------------
procedure List2_onChange (integer self, integer event, sequence params)--params
is ()
	setIndex(List2,getCount(List2))
	setFocus(bttn_AddItem)
end procedure
setHandler( List2, w32HChange, routine_id("List2_onChange"))
--------------------------------------------------------------------------------
procedure bttn_AddItem_onClick (integer self, integer event, sequence
params)--params is ()
	addItem(List2,sprintf("%d - This should be visible on list",getCount(List2)+1))
end procedure
setHandler( bttn_AddItem, w32HClick, routine_id("bttn_AddItem_onClick"))

WinMain( Window1,Normal )


-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu