Thread LISTBOX: alle Einträge aus-/abwählen ???: Button für ALLES AUS-bzw. ABWÄHLEN ??? (3 answers)
Opened by Gerry at 2004-09-04 14:31

Dubu
 2004-09-04 19:12
#42662 #42662
User since
2003-08-04
2145 Artikel
ModeratorIn + EditorIn

user image
[quote=Gerry,04.09.2004, 12:31]Der Button "Alles auswählen" würde also ALLE Einträge in der LISTBOX markieren, so als wären sie mit der Maus markiert worden.
Der Button "Alles abwählen" würde hingegen ALLE Einträge in der LISTBOX de-markieren, so als wären sie mit der Maus wieder de-markiert worden.

Kennt jemand so eine Funktion? In der Doku (z.B. perldoc Tk::Listbox) finde ich so was nicht.[/quote]
[quote= ,perldoc Tk::Listbox]
$listbox->selectionClear(first, ?last?)
       If any of the elements between first and last (inclusive) are selected,
       they are deselected.  The selection state is not changed for
       elements outside this range.
...
$listbox->selectionSet(first, ?last?)
       Selects all of the elements in the range between first and last, inclusive,
       without affecting the selection state of elements outside that range.
[/quote]
first und last sind dabei Indizes. Fuer die gesamte Liste waeren das also "0" bzw. "end".

View full thread LISTBOX: alle Einträge aus-/abwählen ???: Button für ALLES AUS-bzw. ABWÄHLEN ???