RE: Win32Lib: ListView Checkbox Event

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

Andrew Hall wrote:
> 
> Derek Parnell wrote:
> > cklester wrote:
> > >
> > > What event is triggered when I click a checkbox in a ListView? Or,
> > > how do I determine that a checkbox in a ListView was toggled?
> > >
> > 
> > A w32HChange event. 

[snip]


> Is this the same for TreeViews, too?

Almost. The w32HChange event gets invoked when the selected item gets 
chaned to a new one. However the parms parameter is an
empty sequence. I should change this too provide a bit more useful
stuff in that parameter. Anyhow, today you can trap the 
w32HChange event, find out which is the newly selected item (getIndex)
and then get it's properties...

  atom TV_ITEM

  TV_ITEM = struct_TVITEM( . . . )
  w32store(TV_ITEM, TVITEM_hItem, tvitemid)
  VOID = sendMessage( mytreeview, TVM_GETITEM, 0, TV_ITEM )
  -- pick out the data from the item record
  -- eg. mask = w32fetch(TV_ITEM, TVITEM_stateMask)
  . . .
  w32release_mem(TV_ITEM)


-- 
Derek Parnell
Melbourne, Australia

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

Search



Quick Links

User menu

Not signed in.

Misc Menu