[Gambas-user] listbox display selected item [SOLVED]

Dimitris Anogiatis dosida at ...626...
Thu Jul 23 12:40:58 CEST 2009


You're welcome JY, I'm glad I could help :)

Keep up the good work :)
Regards
Dimitris

On Thu, Jul 23, 2009 at 4:25 AM, Jean-Yves F. Barbier <12ukwn at ...626...>wrote:

> Dimitris Anogiatis a écrit :
> > True, I'm still working the kinks on it. It has to do with the code in
> the
> > timer event... and the way the coordinates are interpreted.
> >
> > I'll keep working on it and update the post when I get it perfect (or as
> > close to perfect as possible)
>
> I got it :)
>
> PUBLIC SUB Timer1_Timer()
>  IF Listview1.Count > 0 THEN
>    SELECT CASE Listview1.Find(Mouse.ScreenX - Listview1.ScreenX,
> Mouse.ScreenY
> - Listview1.ScreenY)
>      CASE FALSE
>        PRINT Mouse.ScreenY & " " & Int((Mouse.ScreenY - Listview1.ScreenY)
> / 20)
>        Listview1[getKeyFromPosition(Listview1, (Mouse.ScreenY -
> Listview1.ScreenY) / 19)].selected = TRUE
>      CASE ELSE
>        ' rin de rin
>     END SELECT
>  ENDIF
> END
>
> Working good on both computers (quite normal, as the error was the same on
> each)
>
> Thanks again Dimitri, I would have take many time to succeed (if any)
>
> JY
> --
> Beware of the man who denounces women writers; his penis is tiny and he
> cannot spell.   -- Erica Jong
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list