Re: OnClick[List]

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

Alan,

I agree .. I don't think you can catch a single click in a list control.
You can achieve a double click event by:



procedure process_list_control(integer event, integer x, integer y)
   integer i

   if event = LEFT_DOUBLECLICK then
      i = getIndex(list_control)
      if i > 0 then
         ... do whatever you do when it is selected
      end if
   end if

end procedure

onMouse[list_control] = routine_id("process_list_control")



Hope this helps ...

Regards,

Ray Smith



>A WIN32LIB  (0.15) question:
>I have a list populated by AddItem from a file.
>Is there any way to launch a procedure when
>a list item is selected (clicked) without calling
>a OnClick(ButtonX) that is outside the list?
>Other than looping around a getIndex(List) ? :(
>Ideally a onClick(List) is needed but it is
>not to be found in the win32lib.doc.
>
>Thanks to David and others for WIN32LIB  :)
>You have my vote!
>
>TIA
>Alan Oxley
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu