Contents



DH_PopupListBox

Next

 

Function:

A list box selection sub-control that stays out of sight until needed. The initial appearance looks like a text display rectangle, and can have a transparent background if desired. When the rectangle is clicked, a list box pops up which can be:

  • A floating window that the end user can move and resize.
     

  • A flat fixed window with size and position determined by the designer, or
     

  • A fixed window as above with a sunken border.
     

You can select text and background colors and fonts independently for the initial text display and the popup. The Esc key closes the popup without making a selection.

 



Left-hand side pins:

Bkgd RGB, Txt RGB - Set the background and text colors of the text display rectangle that is visible when the popup list box is not displayed.
Notes:

  • These are integer COLORREF RGB values, as used by Windows, and can be obtained most easily using the DH_HexRGBtoRGB or DH_HSLtoRGB modules in this package, or the DH_TextToRGB or DH_ColorPicker modules from DH_Sub-ControlPak.
     

  • Use a value of -1 for Bkgd RGB for a transparent background.

Font, Font Size - Set the font used in the text display rectangle. Fonts include the core Windows fonts, plus a few others that are widely distributed.

Popup Bkgd RGB, Popup Txt RGB - Set the background and text colors of the list box. Note: The list box cannot have a transparent background.

Popup Font, Popup Font Size - Set the font used in the list box

Initial Height, Initial Width - Dimensions of the list box when it first opens, in pixels.

Initial X Offset, Initial Y Offset - Position where the popup list box will first appear, relative to the upper-left corner of the text display rectangle, measured in pixels. Positive X and Y move the popup to the right and down, negative X and Y move it to the left and up.

Show List - Provides an alternative way to trigger the popup display.

Selection - Text of the selected list item.

Right-hand side pins:

List - Connects to any sub-control left-hand-side list pin.

Index - Index of the currently selected list item.

Selection - Text of the selected list item.
 

Parameters: (right-click Properties)

Window Style - Floating, Fixed, Fixed+Border, as described above.
 

top

Next