GtkCombo Class

The GtkCombo class is the class for instantiating combo (drop-down) widgets.

The class heirarchy


   Object
      +---GtkWidget
         +---GtkContainer
            +---GtkBox
               +---GtkHBox
                  +---GtkCombo

The methods for the GtkCombo class are documented below.

GtkCombo Method Table of Contents

new - Create and initialize the widget
selected - Get the popdown selection
setpopdownstrings - Set the popdown string list
setpopdownstringsfromarray - Set the popdown string list
setvalueinlist - Set a popdown string entry


Method: new

This method creates and initializes the widget.

Example

This is a example of how to create a new combo widget.


mycombo = .GtkCombo~new()

Method Parameters

None.

Method Results

The new GtkCombo object.




Method: selected

This method retrieves the selected entry in the list.

Example

This is a example of how to retireve the selected entry.


selected = mycombo~selected()

Method Parameters

None.

Method Results

The selection string entry.




Method: setpopdownstrings

This method sets the list of popdown strings.

Example

This is a example of how to set the popdown strings.


mylist = .GList~new()
mylist~append('Selection One')
mylist~append('Selection Two')
mylist~append('Selection Three')

mycombo~setpopdownstrings(mylist~head)

Method Parameters

head
The head of a GList object.

Method Results

None.




Method: setpopdownstringsfromarray

This method sets the list of popdown strings.

Example

This is a example of how to set the popdown strings.


mylist = .array~new()
mylist[1] = 'Selection One'
mylist[2] = 'Selection Two'
mylist[3] = 'Selection Three'

mycombo~setpopdownstringsfromarray(mylist)

Method Parameters

mylist
The Object REXX array of strings.

Method Results

None.




Method: setvalueinlist

This method selects a popdown list entry.

Example

This is a example of how to select a popdown list entry.


mycombo~setvalueinlist(entry)

Method Parameters

entry
The text of the entry to be selected.

Method Results

None.




Valid XHTML 1.0!