RE: GtkComboBox question

2006-12-21 Thread Russell Markus
  property name=right_attach3/property
  property name=top_attach0/property
  property name=bottom_attach1/property
  property name=y_options/property
/packing
  /child

  child
widget class=GtkLabel id=ComboBoxVal
  property name=visibleTrue/property
  property name=label translatable=yes/property
  property name=use_underlineFalse/property
  property name=use_markupFalse/property
  property name=justifyGTK_JUSTIFY_LEFT/property
  property name=wrapFalse/property
  property name=selectableFalse/property
  property name=xalign0/property
  property name=yalign0.5/property
  property name=xpad0/property
  property name=ypad0/property
  property name=ellipsizePANGO_ELLIPSIZE_NONE/property
  property name=width_chars0/property
  property name=single_line_modeFalse/property
  property name=angle0/property
/widget
packing
  property name=left_attach2/property
  property name=right_attach3/property
  property name=top_attach1/property
  property name=bottom_attach2/property
  property name=y_options/property
/packing
  /child

  child
widget class=GtkCombo id=ComboBox
  property name=visibleTrue/property
  property name=value_in_listFalse/property
  property name=allow_emptyTrue/property
  property name=case_sensitiveFalse/property
  property name=enable_arrow_keysTrue/property
  property name=enable_arrows_alwaysFalse/property

  child internal-child=entry
widget class=GtkEntry id=combo-entry1
  property name=visibleTrue/property
  property name=can_focusTrue/property
  property name=editableTrue/property
  property name=visibilityTrue/property
  property name=max_length0/property
  property name=text translatable=yes10/property
  property name=has_frameTrue/property
  property name=invisible_char./property
  property name=activates_defaultFalse/property
/widget
  /child

  child internal-child=list
widget class=GtkList id=combo-list1
  property name=visibleTrue/property
  property
name=selection_modeGTK_SELECTION_BROWSE/property

  child
widget class=GtkListItem id=listitem13
  property name=visibleTrue/property
  property name=can_focusTrue/property
  property name=label
translatable=yes10/property
/widget
  /child

  child
widget class=GtkListItem id=listitem14
  property name=visibleTrue/property
  property name=can_focusTrue/property
  property name=label
translatable=yes20/property
/widget
  /child

  child
widget class=GtkListItem id=listitem15
  property name=visibleTrue/property
  property name=can_focusTrue/property
  property name=label
translatable=yes30/property
/widget
  /child

  child
widget class=GtkListItem id=listitem16
  property name=visibleTrue/property
  property name=can_focusTrue/property
  property name=label
translatable=yes40/property
/widget
  /child
/widget
  /child
/widget
packing
  property name=left_attach1/property
  property name=right_attach2/property
  property name=top_attach1/property
  property name=bottom_attach2/property
  property name=y_options/property
/packing
  /child
/widget
packing
  property name=padding0/property
  property name=expandTrue/property
  property name=fillTrue/property
/packing
  /child
/widget
  /child
/widget

/glade-interface 


Russell Markus
Sr. Software Engineer
IPMobileNet, Inc.
(949)417-4590 
-Original Message-
From: Tony Freeman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 6:19 PM
To: Russell Markus
Cc: gtk-app-devel-list@gnome.org
Subject: Re: GtkComboBox question

On Tue, 2006-12-19 at 16:21 -0800, Russell Markus wrote:
 I am trying to work on an application which has a combo box.  I want 
 to restrict the user to values

Re: GtkComboBox question

2006-12-20 Thread Tony Freeman
On Tue, 2006-12-19 at 16:21 -0800, Russell Markus wrote:
 I am trying to work on an application which has a combo box.  I want to
 restrict the user to values that are included in the drop down list only.
 My thought was to prevent the user from editing the value in the entry box,
 but I can't seem to find a way to do this.
 
 I am running Fedora Core 6, and developed the application using glade-2.  I
 am not using the lib, but working with the generated C code.
 
 Thanks for any assistance.


Hello Russell,

I had to do something similar recently.  I used glade to build the
interface, but then had to go back and remove the GtkComboBoxEntry
widgest and replace them with GtkCombobox widgets.

Here's the code with a note:

Note #1:  localization_sites is a global.  The value is populated by the
user via a configuration file. (gchar **localization_sites;)


void build_wfo_list (GtkWidget *combobox)
{
gint i=0;
gint count=0;

/* FILL IN THE DROP DOWN LIST */
count = g_strv_length(localization_sites);
for (i=0; icount; i++) {
gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
  localization_sites[i]);
}

/* SET A DEFAULT SELECTION */
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), 0);
}

-- Tony

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkComboBox question

2006-12-19 Thread Russell Markus
I am trying to work on an application which has a combo box.  I want to
restrict the user to values that are included in the drop down list only.
My thought was to prevent the user from editing the value in the entry box,
but I can't seem to find a way to do this.

I am running Fedora Core 6, and developed the application using glade-2.  I
am not using the lib, but working with the generated C code.

Thanks for any assistance.

Russell Markus
Sr. Software Engineer
IPMobileNet, Inc.
(949)417-4590 

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkComboBox question

2006-12-19 Thread Paul Pogonyshev
Russell Markus wrote:
 I am trying to work on an application which has a combo box.  I want to
 restrict the user to values that are included in the drop down list only.
 My thought was to prevent the user from editing the value in the entry box,
 but I can't seem to find a way to do this.
 
 I am running Fedora Core 6, and developed the application using glade-2.  I
 am not using the lib, but working with the generated C code.

Um, that's exactly what GtkComboBox does, no?  To allow editing, you need
a GtkComboBoxEntry.

Paul
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkComboBox question

2006-12-19 Thread wallace . owen
On Wed, 2006-12-20 at 02:31 +0200, Paul Pogonyshev wrote:
 Russell Markus wrote:
  I am trying to work on an application which has a combo box.  I want to
  restrict the user to values that are included in the drop down list only.
  My thought was to prevent the user from editing the value in the entry box,
  but I can't seem to find a way to do this.
  
  I am running Fedora Core 6, and developed the application using glade-2.  I
  am not using the lib, but working with the generated C code.
 
 Um, that's exactly what GtkComboBox does, no?  To allow editing, you need
 a GtkComboBoxEntry.

He says he's using a combo box, but you suspect he's accidentally chosen
a GtkComboBoxEntry in glade?


  // Wally

-- 
Constructing a program is like painting a room.   A beginner at either
will start in one corner and end in another, left there to discover just
how important approach and technique are in obtaining a good result.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list