Documentation for Win32lib v0.60.5
Table of Contents

ComboBox

  • func getEdit( integer ComboId )    Get the control id of the ComboId control's edit box.

    Documentation for Win32lib v0.60.5
    Table of Contents

    [func]
    getEdit
    ( integer ComboId )

    Get the control id of the ComboId control's edit box.

    Returns: INTEGER: The EditBox control Id. Zero if the ComboId is not a type of combo box.

    Category: ComboBox

    A combo box is made up of two parts, a listbox and an editbox. The editbox is normally never directly used as it is handled by Windows. However, it is sometimes useful for your application to handle the editbox's events directly.
    The control id for the editbox is automatically assigned by Win32lib when the combobox is created. This function is used to fetch it.

    Example:

      procedure keytrap(integer self, integer event, sequence parms)
          if parms[1] = VK_ESCAPE then
             -- move to the first item.
             setIndex(getParent(self), 1)
          elsif parms[1] = VK_ENTER then
             -- Ignore the Enter key
             returnValue(-1)
          end if
      end procedure
      setHandler(getEdit(MyCombo), w32HKeyPress, routine_id("keytrap"))