RE: [gtkmm] Some important methods missing from ComboBox
- From: "Garriss, Michael" <Michael Garriss abacus-direct com>
- To: 'Mark Jones' <mark jones106 verizon net>, gtkmm-list gnome org
- Subject: RE: [gtkmm] Some important methods missing from ComboBox
- Date: Wed, 6 Nov 2002 08:12:51 -0700
To set the text of the box:
m_combo.get_entry( )->set_text( s );
BUT, you have to make sure that ustring you pass it makes sense. You could
set it to a string that is not in the list that was initially set into in
the combo box. This, in my opinion is a feature, not a bug.
I agree with you that it would be nice to have set/get index type interface.
You can however achieve the functionality of a set/get index by using STL
containers cleverly. So no, it's usability is not limited in the way you
described, it's just more difficult to achieve.
If you're moving from Java to gtkmm then you're going to run into a lot of
paradigm shifts. Java swing is purely object oriented where as gtkmm uses a
STL generic style in many places. At times gtkmm can be very powerful at
others it's a bit frustrating but remember that it's a project in motion.
Good luck and have fun!
-Mike Garriss
-----Original Message-----
From: Mark Jones [mailto:mark jones106 verizon net]
Sent: Wednesday, November 06, 2002 12:01 AM
To: gtkmm-list gnome org
Subject: [gtkmm] Some important methods missing from ComboBox
I am trying to do certain things with the combo box, that if done with
Java swing would be extremely simple and straightforward. Specifically
I am trying to find an equivalent to the following:
JComboBox::setSelectedItem(this could be a string that matches one
already in the list)
JComboBox::setSelectedIndex(int index of the list)
int JComboBox::getSelectedIndex()
Without these methods (or very similar), it is very limited in usability
I think. Perhaps this is a gtk problem, as gtkmm seems to just mirror
the functionality of gtk. If gtkmm is not meant to stray away from gtk
or extend it too much, let me know and I'll post on the gtk list about
this.
Is there any way to do something similar to the above methods? There
just seems to be so much more functionality in the java combo box than
the gtk combo box, and Java is the background that I have and where I'm
coming from. But, I like gtk, and what it is creating for UNIX and so I
am hoping to provide constructive opinions and not just a complaint.
Thanks,
Mark
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]