1. OnClick[List]

------=_NextPart_000_000E_01BE757C.64F62500
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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.=20

Thanks to David and others for WIN32LIB  :)=20
You have my vote!

TIA
Alan Oxley
=20

------=_NextPart_000_000E_01BE757C.64F62500
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>A WIN32LIB&nbsp; (0.15) =
question:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I have a list populated by AddItem =
from a=20
file.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Is there any way to launch a =
procedure=20
when</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>a list item is selected (clicked) =
without=20
calling</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>a OnClick(ButtonX) that is outside =
the=20
list?</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Other than looping around a =
getIndex(List) ?=20
:(</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Ideally a onClick(List) is needed =
but it=20
is</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>not to be found in the win32lib.doc. =

</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Thanks to David and others for =
WIN32LIB&nbsp; :)=20
</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>You have my=20
vote!</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>TIA</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>Alan =
Oxley</FONT></DIV>

------=_NextPart_000_000E_01BE757C.64F62500--

new topic     » topic index » view message » categorize

2. Re: OnClick[List]

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

Search



Quick Links

User menu

Not signed in.

Misc Menu