[lazarus] listbox patch
Marc Weustink
marc.weustink at cuperus.nl
Mon Dec 15 05:03:22 EST 2003
+ From: Vincent Snijders [mailto:VSDS at RND.VB.CBS.NL]
+ Sent: maandag 15 december 2003 9:42
+
+ > -----Oorspronkelijk bericht-----
+ > Van: Marc Weustink [mailto:marc at dommelstein.net]
+ > At 00:05 15-12-2003, Vincent Snijders wrote:
+ > >I noticed a different appearance / behaviour of the gtk-linux and
+ > >win32. In gtk clicking on the text selects the item, but does not
+ > >check it. In the win32 interface, clicking on the item text checks
+ > >the item. In win32 no selected item is shown.
+ >
+ > That is probably because GTK has no native checklistbox (it has no
+ > normal listbox like win32 either).
+ > GTK has a listbox with a list of widgets, which in normal cases are
+ > labels. When implementing the checklistbox, I saw no reason why
+ > those labels couldn't be labels and checkboxes. So in GTK you
+ > select the labels and check the checkboxes. I tried Checkboxes
+ > alone, but then you couldn't slecet an item without checking it.
+ I think the implementation in GTK is ok.
+ > Since the UI of GKT and win32 differs I had no problems with the
+ > different behaviour (we're not trying to let GTK widgets behave
+ > like windows)
+ The win32 implementation uses an OwnerDrawn listbox. I think it should
+ respect the selected state of an item.
Indeed
+ Now selected and not selected items are shown the same. Otherwise a
+ developer with gtk could think he could give some meaning to the
+ selected item (e.g. pushing a button will delete the selected item),
+ but with win32 the user doesn't see what the selected item is.
Indeed. Also if you dont show the selected state one could never (?)
select items using the keyboard. Like selecting with cursor keys and ctrl
and or shift. Then pressing space to toggle all selected checks. I think
thsi is a common win32 feature.
Marc
More information about the Lazarus
mailing list