Show quoted text 23 lines
-----Original Message-----
From: Michal Bukovjan
Sent: Thursday, February 10, 2000 04:19 PM
To:
Subject: Re: [Re: Fw: TListBox]
Last time I checked the TListBox was working well. I'll look
why was the
internal list changed back to TStringList - it makes no sense. The
TGtkListStringList was created and should be used as a counterpart to
TListBoxStrings found in Delphi, which looks up the strings
in the underlying
Win32 list box. This way, the list box items are not held
twice in memory.
Since the TListBoxStrings is Win32 specific, hence the need for
TGtkListStringList. Note that the TListBox only knows in has
TStrings, it does
not now about concrete descendant, which is determined in the
interface
object.
The same technique is used for items of TComboBox.
Don't forget this control should save the contents in a real TStringList during a DestroyHandle, and repopulate the underlying control from this during the CreateHandle. When updating the items property, if HandleAllocated returns false you do the same operations on the temporary TStringList instead.
One the handle is allocated and populated from the TStringList the StringList can be free'd.
Sam
