2.8.0 Gtk2: Assert on wxListBox::SetString()

Thomas Zehbe tz at ingenion.de
Thu Apr 12 23:21:35 PDT 2007


Am Donnerstag, 12. April 2007 22:41 schrieb Vadim Zeitlin:
> On Thu, 12 Apr 2007 21:01:00 +0200 Robert Roebling wrote:
>
> RR> As per Ryan comment in wxListBox::SetString(), is the listbox
> RR> supposed to resort after SetString()?
>
>  Yes, I think so.
No, it isn't. wxLB_SORT isn't applied. The listbox entries represent a couple 
of database records being master data records to be referenced by dynamic 
data. Selecting one of the lb entries transfers the coresponding db record to 
the textctrls for editing the records data. If the columns data which makes 
up the listbox entries is changed, the string in the lb must be changed too 
to reflect the users actions.

From a "don't blame the users" point of view a simple SetString() should have 
no side effects as long the boxes style is unsorted, IMO.

Regards,
Thomas


>
> RR> In that case it might really be easier to insert and readd the string
> RR> and block events while doing that.
>
>  From reading GTK+ code the tree view is already supposed to resort itself
> when gtk_list_store_set() is called. After all, this is what GtkInsertItems
> does anyhow.
>
>  Regards,
> VZ

-- 
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7
www.ingenion.de




More information about the wx-users mailing list