[Gambas-user] listbox display selected item [SOLVED]
Jean-Yves F. Barbier
12ukwn at ...626...
Thu Jul 23 12:25:03 CEST 2009
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
More information about the User
mailing list