Text appended to ComboBox appears blank

Hello list,

I am appending text to a couple of ComboBoxes In the following code snippet:

   clear_text($LeftTreeComboBox) if $ntreesleft;
   clear_text($RightTreeComboBox) if $ntreesright;
   for($i=1; $i<=$count; $i++) {
      $temp = getstack("Archives",$i-1);
      Debug_Info("$i $temp\n");
      $ntreesleft = $ntreesright = $count;   


sub append_text {
    my ($combobox, $text) = @_;
    my $model = $combobox->get_model;
    $model->set ($model->append, 0, $text);

sub clear_text {
   my $combobox = shift;
   my $model = $combobox->get_model;

but no visible text appears in the ComboBoxes. They both pop down as if text was appended, but none is visible. The Debug_Info output shows that the $temp text is there, but is doesn't show up in the ComboBoxes.

The ComboBox ListStore model was previously defined in a callback like the following, where the ComboBox widget was captured in the global variable $LeftTreeComboBox.

# Callback name: on_LeftTreeComboBox_expose_event
# Called from widget: LeftTreeComboBox
sub on_LeftTreeComboBox_expose_event {
   my ( $self, $widget ) = @_;
   return if $LeftTreeComboBox;
   Debug_Call( "\n"); 
   $LeftTreeComboBox = $widget;
   my $model = Gtk2::ListStore->new("Glib::String");
   $widget->set_model ($model);

Anyone have an idea what is wrong here?

Joseph 'Bear' Thames
Meta Science Foundation
(505) 977-9024 - Cell Phone
beartham gmail com

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