1. RE: Win32Lib: ListView Checkbox Event

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. The 'parms' parameter in the event handler receives
> a sequence with a whole lot of info. I can't remember all the flag/mask
> values just now, but experiment but inpsecting the values you do receive.
> 
> The parms sequence should contain...
> {
>  Row number,
>  Column number,
>  NewState,
>  OldState,
>  MouseX,
>  MouseY,
>  UserDataValue
> }

Is this the same for TreeViews, too?

Andrew

new topic     » topic index » view message » categorize

2. RE: Win32Lib: ListView Checkbox Event

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 message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu