Gtk::Combobox alignment issue



Hi,

I'm facing a little problem with comboboxes, I had to fix the combobox
size, the model has only a Gtk::TreeModelColumn<Glib::ustring> strItem:

class SigleUstringComboBoxModelColums : public Gtk::TreeModel::ColumnRecord
    {
    public:

        SigleUstringComboBoxModelColums()
        {
            add(strItem);
        }

        Gtk::TreeModelColumn<Glib::ustring> strItem;
    };

Now the items that appear in the combobox are dynamic and depends of the
previous user chooses.
Because i had to fix the with of the combo box when, it creates a big
gap between the last character and the end of the combobox, when the
strings are small. So I tried to align, but without success, one of the
reasons is because I try to do something like "mComboModel.set_alignment
(Gtk::ALINGN_CENTER)" but this method does not exist. I also thought to
try with a Gtk::ComboBoxText but then I would only have a solution for
text combobox what if I face the same problem with other types of
TreeModelColumns.

Thanks,
Filipe





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]