Documentation for Win32lib v0.60.6
Table of Contents

Controls

Controls are the basic elements of Windows programs.


You can create them, query and change Attributes, and respond to Events.

See Also: Attributes

  • const Bitmap   Static bitmap control.
  • const CancelButton   Command button that reacts to the Escape key.
  • const CheckBox   CheckBox control.
  • proc closeWindow( window )    Close window.
  • const Combo   Combo box control.
  • const ComboBoxEx   Combobox with images
  • const CText   Center-justified label control.
  • const DefPushButton   Default command button control.
  • proc disableControlSet(object set)   Disables all the controls in the identified set(s).
  • const DropDownList   Drop down list control.
  • const EditText   Text edit control control.
  • proc enableControlSet(integer id)   Enables all the controls in the identified set, and disables the previously enabled set.
  • const FlatToolbar   Creates a toolbar without a 3D border.
  • func getEdit( integer ComboId )    Get the control id of the ComboId control's edit box.
  • const Group   Group control.
  • const GroupAdv   An advanced Group control.
  • proc hideControlSet(object set)   Hides all the controls in the identified set(s).
  • const HScroll   Horizontal scrollbar control.
  • const HTrackBar   Horizontal track bar control.
  • const Icon   Icon control.
  • const List   List.
  • const ListView   ListView
  • const LText   Left-justified label control.
  • const Menu   Menu bar item control.
  • const MenuItem   Dropdown menu item control.
  • const MenuSpacer   Horizontal spacer (line) in menu items.
  • const MleText   Multi-line edit control.
  • const MonthCalendar   MonthCalendar
  • const PictureButton   Command button with graphic control.
  • const Pixmap   Color bitmap.
  • const Popup   Popup menu control.
  • const Printer   Handle to the printer.
  • const ProgressBar   Progress Bar
  • const PushButton   Command button control.
  • const Radio   Radio button control.
  • const ReBar   ReBar
  • const RichEdit   RichEdit
  • const RText   Right-justified label control.
  • const Screen   Identifes the screen.
  • const SepButton    Separator button for use with FlatToolBar Controls
  • proc setControlBlocks(integer pQty)   Sets the number of new memory areas created for new controls
  • proc setControlSet(integer Set, integer Add, object id)   Create and maintains the entries in a control set.
  • proc setToolBarSize(integer id, object Property, object Values)   Set one or more size properties of a ToolBar or FlatToolBar.
  • proc showControlSet(integer id)   Makes visible all the controls in the identified set, and hides the previously shown set.
  • const SimpleCombo   Simple combo box control.
  • const SortedCombo   Sorted combo box control.
  • const SortedList   Sorted list control.
  • const StatusBar   Window status bar control.
  • const TabControl   Tab Control.
  • const TabItem   Tab on a TabControl.
  • proc tab_direction(integer id, integer direction )   Moves focus ahead or back to next available focus item
  • const ToggleButton   Toggle button control.
  • const TogglePicture   Toggle button with graphic control.
  • const ToolBar   Window toolbar control.
  • const ToolTip   Creates a ToolTip control.
  • const TreeView   TreeView
  • const TriCheckBox   Three state checkbox control.
  • const UpDown   UpDown
  • const VScroll   Vertical scrollbar control.
  • const VTrackBar   Vertical track bar control.
  • const Window   A Window is a normal Win32 window.

    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Bitmap

    Static bitmap control.

    Category: Controls

    A Bitmap does not respond to events.

    A Bitmap has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • SS_BITMAP: bitmap
  • SS_NOTIFY: Enable click events

    See Also: CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    CancelButton

    Command button that reacts to the Escape key.

    Category: Controls

    A CancelButton is a PushButton, but is displayed with italic font indicating that this button will automatically be selected if the user presses the Escape key.

    A CancelButton has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    CheckBox

    CheckBox control.

    Category: Controls

    A CheckBox is a button that can be toggled on or off. It appears as a box with a label to the side. Clicking the checkbox causes an 'X' to be toggled in the box.

    A CheckBox has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_AUTOCHECKBOX: checkbox, default window handling
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    closeWindow
    ( window )

    Close window.

    Category: Controls

    If window is not a main window, window will be hidden and the onClose event will be triggered.

    If window is the main window (see WinMain) or zero, then the application will be shut down and the onClose event will

    If window is not a valid id, then no action is taken.

    Example:

              -- close TheDialog
               closeWindow( TheDialog )
    

    See Also: Bitmap, CancelButton, CheckBox, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Combo

    Combo box control.

    Category: Controls

    A Combo is a combination of an edit control and a list. If you need the items in the combo to be sorted, use a SortedCombo instead. In addition to being able to select a value from the combo's list, the user can enter their own value as well.

    A Combo has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_VSCROLL: attach a vertical scroll bar
  • CBS_DROPDOWN: the list can drop down, like a menu
  • CBS_HASSTRINGS: contains string values
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ComboBoxEx

    Combobox with images

    Category: Controls

    The ComboBoxEx control works almost exactly like a normal Combo, but you can include images to be displayed along side the item text. See addItem for details.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    CText

    Center-justified label control.

    Category: Controls

    A CText control does not respond to events.

    A CText has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • ES_CENTER: center justify the text
  • SS_NOTIFY: Enable click events

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    DefPushButton

    Default command button control.

    Category: Controls

    A DefPushButton is a PushButton, but is displayed with an extra border indicating that this button will automatically be selected if the user presses the Return button on the keyboard.

    A DefPushButton has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_DEFPUSHBUTTON: button style is default pushbutton
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    disableControlSet
    (object set)

    Disables all the controls in the identified set(s).

    Category: Controls

    set is either a single ControlSet id, or a list of ControlSet ids.

    If set is zero, then all known ControlSets are disabled.

    Example:

          -- Disable all sets
          disableControlSet(0)
          -- Disable one set
          disableControlSet(2)
          -- Disable a few sets
          disableControlSets({1,3,2,5})
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    DropDownList

    Drop down list control.

    Category: Controls

    A DropDownList is like a Combo, but the user can only select items on the list, and not enter their own value into the edit box.

    A DropDownList has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_VSCROLL: attach a vertical scroll bar
  • CBS_DROPDOWNLIST: the list can drop down, like a menu
  • CBS_HASSTRINGS: contains string values
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    EditText

    Text edit control control.

    Category: Controls

    An EditText allows the user to enter a single-line of text into the control.

    Note that when the user presses the Return Key, the focus will move to the next control in the focus order. To prevent this from happening, you need to set a w32HKeyPress handler that sets the return value to -1 when a VK_RETURN key without shifts is received.

          procedure IgnoreReturn(integer self, integer event, sequence parms)
              if parms[1] = VK_RETURN and parms[2] = 0 then
                  returnValue(-1)
              end if
          end procedure
          setHandler(myEditField, w32HKeyPress, routine_id("IgnoreReturn"))
    

    A EditText has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • ES_AUTOHSCROLL: automatic vertical scrollbar, if needed
  • ES_LEFT: left justify the text
  • WS_BORDER: draw with a border
  • WS_TABSTOP: the control can be tabbed to
  • WS_EX_CLIENTEDGE: 3D effect
  • WS_EX_ACCEPTFILES: drag and drop support

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    enableControlSet
    (integer id)

    Enables all the controls in the identified set, and disables the previously enabled set.

    Category: Controls

    id is the id of a ControlSet created by setControlSet

    Example:

          sequence FuncGroup
          sequence TriggerGroup
          constant CustomerGrp=1, OrderGrp=2, InventGrp=5, AdminGrp=7
    

    setControlSet(CustomerGrp, w32True, {Fld1, Fld2, Fld3}) setControlSet(OrderGrp, w32True, {Fld11, Fld12, Fld13, Fld14}) setControlSet(InventGrp, w32True, {Fld21, Fld22}) setControlSet(AdminGrp, w32True, {Fld31, Fld32, Fld33}) TriggerGroup = {Btn1, Btn2, Btn3, Btn4} FuncGroup = {CustomerGrp, OrderGrp, InventGrp, AdminGrp}

    procedure Click_Buttons(integer self, integer event, sequence parms) enableControlSet( FuncGroup[ find(self, TriggerGroup) ] ) end procedure setHandler(TriggerGroup, w32HClick, routine_id("Click_Buttons"))

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    FlatToolbar

    Creates a toolbar without a 3D border.

    Category: Controls

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    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: Controls

    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"))
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Group

    Group control.

    Category: Controls

    A Group is a static control, and recieves no events. It's main function is to seperate other controls into groups.

    In addition to providing a visual cue, the group alters the behavior of the Radio control; all the radio buttons within a single group are considered to belong to the same group.

    When placing controls in groups, it's a good idea to make them children of the Group, instead of children of the Window. If you don't, the Group may end up routing events meant for the control to itself. For example, onDragAndDrop events will be routed to the Group instead of the child.

    A Group has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_GROUPBOX: group box control

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    GroupAdv

    An advanced Group control.

    Category: Controls

    This is similar to the standard Group control that comes with Windows but allows greater control over its appearance.

    In order to use this control, you must add
    include groupadv.ew after the Win32lib.ew include.

    You create the control using the standard methods in Win32lib.

      constant GroupX = create(GroupAdv, "Display Options", theWindow, 100, 34, 200, 200, 0)
    

    The purpose of the control is to group together a set of related controls. You do this by making the GroupAdv control the parent to those controls.

      constant Rad1 = create(Radio, "300 x 200", GroupX, 10, 10, 100, 25, 0)
      constant Rad2 = create(Radio, "600 x 400", GroupX, 10, 40, 100, 25, 0)
      constant Rad3 = create(Radio, "800 x 600", GroupX, 10, 70, 100, 25, 0)
    

    You can set the various appearance properties by calling setUserProperty. The support properties are ...

  • BorderColor Sets the color of the group box outline. Must be a 24-bit color value. Initially it is set to getSysColor(COLOR_BTNSHADOW).
  • BorderWidth Sets the style and width of the border. A positive value is a simple width value for the border of the specified color. A value of zero means that no border is drawn. A negative value means that the border color is ignored and the border is given a 3-D look instead, using the absolute value of the width value. Initially it is set to 1.
  • CaptionFGColor Sets the color of the caption text. Initially it is set to getSysColor(COLOR_BTNTEXT).
  • CaptionBGColor Sets the color of the caption text background. A negative value means that the caption background is transparent. Initially it is set to getSysColor(COLOR_BTNFACE).
  • CaptionBorderColor Sets the color of the border around the caption text. A negative value means that no border is drawn around the caption text. Initially it is set to -1.
  • CaptionPlacement Determines whether the caption text is placed on the top or bottom of the group box. A value of 0 places it on the top, and any other value places it on the bottom. Initially is is set to 0 (top placement).
  • CaptionAlignment Determines left-center-right alignment of the caption text. A value of 0 means left alignment, a value of 1 is center alignment, and a value of 2 is right alignment. Initially it is set to 0 (left alignment).
  • CaptionOffset Sets that number of pixels the text is offset from the alignment edge. If the alignment is left or center, this is the offset from the left, otherwise this is the offset from the right. Initially it is set to 10.
  • CaptionCornerSize Sets the amount of rounding for the caption text border. A value of 0 means that it doesn't have rounded corners. Initially it is set to 5.
  • CornerSize Sets the amount of rounding for the group box border. A value of 0 means that it doesn't have rounded corners. Initially it is set to 10.
  • CaptionIcon If not zero, this is the handle to a bitmap that is displayed to the left of the caption text. Initially it is set to 0.

    Example:

        setUserProperty(lId, "BorderColor" , Red)
        setUserProperty(lId, "BorderWidth" , 2)
        setUserProperty(lId, "CaptionFGColor" ,Gray)
        setUserProperty(lId, "CaptionBGColor" ,BrightWhite)
        setUserProperty(lId, "CaptionBorderColor" , Blue)
        setUserProperty(lId, "CaptionPlacement" ,1)
        setUserProperty(lId, "CaptionAlignment" ,2)
        setUserProperty(lId, "CaptionOffset" ,0)
        setUserProperty(lId, "CaptionCornerSize" , 0)
        setUserProperty(lId, "CornerSize" ,0)
        setUserProperty(lId, "CaptionIcon", loadBitmapFromFile("image1.bmp"))
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    hideControlSet
    (object set)

    Hides all the controls in the identified set(s).

    Category: Controls

    set is either a single ControlSet id, or a list of ControlSet ids.

    If set is zero, then all known ControlSets are hidden.

    Example:

          -- Hide all sets
          hideControlSet(0)
          -- Hide one set
          hideControlSet(2)
          -- Hide a few sets
          hideControlSets({1,3,2,5})
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    HScroll

    Horizontal scrollbar control.

    Category: Controls

    An HScroll has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • SBS_HORZ: horizontal scroll bar
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    HTrackBar

    Horizontal track bar control.

    Category: Controls

    An HTrackBar has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • TBS_VERT: vertical scrollbar
  • TBS_AUTOTICKS: ticks automatically created
  • TBS_ENABLESELRANGE: range highlighted, triangles at end of range
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Icon

    Icon control.

    Category: Controls

    An Icon is a static small graphic. As a static control, it does not respond to events.

    An Icon has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • SS_ICON: icon
  • SS_NOTIFY: Enable click events

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    List

    List.

    Category: Controls

    A List contains a list of items, arranged in the order that they were placed into the list. To have a sorted list, either sort the items before placing them into the list, or use the SortedList control.

    A List has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • LBS_NOTIFY: notify parent of events
  • WS_VSCROLL: attach a vertical scroll bar
  • WS_BORDER: draw a border on the control
  • WS_TABSTOP: the control can be tabbed to
  • WS_EX_CLIENTEDGE: 3D effect
  • WS_EX_ACCEPTFILES: drag and drop support

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ListView

    ListView

    Category: Controls

    A list view control is a window that displays collection of items, each item consisting of an icon and a label. List view controls provide several ways of arranging items and displaying individual items. For example, additional information about each item can be displayed in columns to the right of the icon and label.

    List views have 3 modes:

  • Icon
  • List
  • Report

    Report mode can display multiple columns, which can be defined upon creation of the control:

     Win = create( Window, "The Window", 0, 0, 0, 300, 300, 0 ),
    lv  = create( ListView, {"Column 1", Column 2"}, Win,
    20, 20, 200, 200, LVS_REPORT )
    WinMain( Win, Normal )
    

    See also: addIcon, addLVItem, deleteItem

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    LText

    Left-justified label control.

    Category: Controls

    An LText control does not respond to events.

    An LText has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • ES_LEFT: left justify the text
  • SS_NOTIFY: Enable click events

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Menu

    Menu bar item control.

    Category: Controls

    A Menu is an item in a window's menubar. There is no need to declare a menubar for a window; if a Menu is created, the menubar will automatically be created for it.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    MenuItem

    Dropdown menu item control.

    Category: Controls

    A MenuItem is an item in a window's Menu. Menu items are placed sequentially into menus.

    There is currently no way to remove menu items.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    MenuSpacer

    Horizontal spacer (line) in menu items.

    Category: Controls

    A MenuSpacer is placed as a horizontal line in a window's Menu.

    There is currently no way to remove menu items.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    MleText

    Multi-line edit control.

    Category: Controls

    An MleText (multi-line edit) control is like a mini-text editor. The user can enter in multiple lines of text.

    Since the Tab key is accepted as input into the MLE, the user has to press Control+Tab to move to the next control, instead of the standard Tab key.

    A MleText has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_HSCROLL: horizontal scroll bar
  • WS_VSCROLL: vertical scroll bar
  • ES_LEFT: left justify the text
  • WS_BORDER: draw with a border
  • ES_MULTILINE: allow multiple lines of text
  • WS_TABSTOP: the control can be tabbed to
  • WS_EX_CLIENTEDGE: 3D effect
  • WS_EX_ACCEPTFILES: drag and drop support

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    MonthCalendar

    MonthCalendar

    Category: Controls

    MonthCalendar is a control used for selecting dates. It displays a calendar (one month at a time) from which the user can select a date or a range of dates.

    See also: formatDate(), getSelectedDate(), getSelectedDateRange(), setMonthColor(), setSelectedDate(), setSelectedDateRange()

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    PictureButton

    Command button with graphic control.

    Category: Controls

    A PictureButton is a PushButton with a graphic instead of text. The graphic can be specified by passing the name or address of a bitmap control in the flags parameter, or with setBitmap, setIcon

    A PictureButton is typically used in a ToolBar.

    This can show either an Icon or a Bitmap. The choice is made when the control is created using the create() routine. When being created, the style parameter is used to designate the image and format of images on the button. The style parameter can be one of ...

  • w32PB_BITMAP which indicates that the application will later explicitly set a bitmap image to the button.
  • 0 which is the same as w32PB_BITMAP
  • w32PB_ICON which indicates that the application will later explicitly set an icon image to the button.
  • A handle to a pre-loaded bitmap image.
  • A handle to a pre-loaded icon image.
  • A filename to either a .BMP or a .ICO file.

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_PUSHBUTTON: button style is pushbutton
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Pixmap

    Color bitmap.

    Category: Controls

    A Pixmap is an off-screen color bitmap. It can be displayed in a window by using one of the bitblt functions (see Graphics for details).

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Popup

    Popup menu control.

    Category: Controls

    A Popup is a menu not attached to a window. To display a popup, use popup().

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Printer

    Handle to the printer.

    Category: Controls

    The Printer refers to the selected printer. Before it can be used, you must first select a printer using getPrinter. After you are done printing, you should release the Printer with releasePrinter.

    Each document should be begin and end with a startDoc and endDoc pair. Likewise, each page should begin and end with a startPage and endPage pair.

    For the sake of space, the example doesn't use the values returned by getPrinter.

    Example:

        -- example of using printer
        sequence result
    

    -- select the printer result = getPrinter()

    -- did the user select a printer? if length( result ) then

    -- start a new document if not startDoc( sprintf( "My Job, Copy %s", {i} ) ) then exit end if

    -- start a new page if not startPage() then exit end if

    -- print on the page wPuts( Printer, "Hello, Printer!" )

    -- close the page if not endPage() then exit end if

    -- close the document if not endDoc() then exit end if

    -- release the printer releasePrinter()

    end if

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ProgressBar

    Progress Bar

    Category: Controls

    A ProgressBar is used to show what amount of a task is complete. To move the position of the ProgressBar indicator, call setScrollPos. By default, the ProgressBar ranges from 1 to 100. You can change the range by calling setScrollRange().

    For the most part, the ProgressBar behaves like most other Scroll Controls.

    The following example creates a Window that contains a Timer and a ProgressBar. As the Timer ticks, the ProgressBar is automatically incremented.

      constant
           Win   = create(/Window,"Timer Window",0,Default,Default,200,100,0),
           PBar  = create(/ProgressBar,"",Win,5,40,180,20,0),
          Timer = 1
    

    procedure tick( integer self, integer event, sequence parms) integer timerId timerId = parms[1] -- advance the progress bar by 5 ticks setScrollPos( PBar, getScrollPos( PBar ) + 5 ) end procedure setHandler(Win, w32HTimer, routine_id( "tick" ))

    -- tick once per second setTimer( Win, Timer, 1000 )

    WinMain( Win, Normal )

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    PushButton

    Command button control.

    Category: Controls

    A PushButton is a normal push button (sometimes called command button). A PushButton has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_PUSHBUTTON: button style is pushbutton
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Radio

    Radio button control.

    Category: Controls

    A Radio is similar to a CheckBox, in functionality. Like a checkbox, it can be toggled on and off. However, radio buttons are grouped controls - if one is toggled on, the rest in the group are toggled off.

    Win32Lib considers a radio button in a group if they are contained by the same Group control. If there is no Group control, then all the radio buttons are considered to belong to the same group.

    A Radio has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_AUTORADIOBUTTON: radio button control
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ReBar

    ReBar

    Category: Controls

    Rebars are similar to toolbars, but can do some fancier things. You can put any sort of control into a rebar.

    Example:

    -- create the rebar
     rebar = create( ReBar, "", owner, x, y, cx, cy, flags )
    -- create a band for the rebar
     band = create( ReBarBand, caption, rebar, 0, 0, cx, cy, flags )
    -- [NOTE: to create the band on a new line within the rebar,
    -- use RBBS_BREAK ]
    -- add controls to the bands.  Controls should be children
    -- of the rebar.
     combo = create( Combo, "", rebar, 0, 0, cx, cy, flags )
     addToBand( combo, band )
    

    See also: addToBand(), ReBarBand

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    RichEdit

    RichEdit

    Category: Controls

    A rich edit control is a window in which the user can enter and edit text. The text can be assigned character and paragraph formatting, and can include embedded OLE objects. Rich edit controls provide a programming interface for formatting text. However, and application must implement any user interface components necessary to make formatting operations available to the user.

    Example:

               -- Create the RichEdit control
                RE = create( RichEdit, "", Win , 20, 20, 360, 200, ES_NOHIDESEL)
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    RText

    Right-justified label control.

    Category: Controls

    An RText control does not respond to events.

    An RText has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • ES_RIGHT: right justify the text
  • SS_NOTIFY: Enable click events

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Screen

    Identifes the screen.

    Category: Controls

    The Screen refers to the computer screen. It is automatically created, and it most graphic methods that work in Windows will also work with the screen.

    Example:

              -- Draw an 'x' across the screen
              sequence size
    

    -- get the screen width & height size = getCtlSize( Screen )

    -- set the pen color to red setPenColor( Screen, Red )

    -- draw the lines drawLine( Screen, 0, 0, size[1], size[2] ) drawLine( Screen, size[1], 0, size[2], 0 )

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    SepButton

    Separator button for use with FlatToolBar Controls

    Category: Controls

    This should only be used with FlatToolBar controls. It creates a divider between buttons, which is shown as a vertical line.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setControlBlocks
    (integer pQty)

    Sets the number of new memory areas created for new controls

    Category: Controls

    Whenever a new control is created, it requires some memory to be allocated to manage it, and because this can be a performance hit win32lib has the ability to created multiple new control blocks in one operation. This means that when a new control is being created, and there is no available control blocks, it will create pQty control blocks so that the next new control doesn't have to allocate memory. Initially win32lib will allocate 16 new control memory blocks.
    Note: pQty must be 1 or more, otherwise 16 will be used.

    Example

              -- lots of Controls will be created in this app
              -- so allocate all the control blocks in one go.
              setControlBlocks(147)
              -- The first new create() will actually allocate the memory.
               constant myWin = create(Window, ...)
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setControlSet
    (integer Set, integer Add, object id)

    Create and maintains the entries in a control set.

    Category: Controls

    ControlSets are used to easily manipulate a set of related controls.

    Set is the id of the control set. If it doesn't exist, it is created.
    Add is a True/False flag. If w32True then the id is added to the set, otherwise it is removed from the set.
    id is either a single control id or a list of control ids.

    Example:

          -- Add some controls to a set.
          setControlSet(InventGrp, w32True, {Fld21, Fld22})
          setControlSet(InventGrp, w32True, {Fld23, Fld25})
          -- The control set 'InventGrp' now has 4 ids in it.
          -- Remove one.
          setControlSet(InventGrp, Fld22)
          -- The control set 'InventGrp' now has 3 ids in it.
    

    See also: showControlSet, hideControlSet, enableControlSet, disableControlSet

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setToolBarSize
    (integer id, object Property, object Values)

    Set one or more size properties of a ToolBar or FlatToolBar.

    Category: Controls

    This is really only needed for Win95 as later versions do this automatically.
    id is the Id of the tool bar.
    Property is a list of properties to affect. These can be any combination of w32TB_BUTTONSIZE, w32TB_BITMAPSIZE, and w32TB_HEIGHT.
    Values is a list of the new value(s) to set.
    There must be the same number of values as properties.
    Note for the button size and bitmap size, the values must be expressed as a 2-element sequence containing {width, height}. For the height value, this must be a single integer.

    There is no way to set the width of a toolbar as it always matches it's window's width.

    Example:

          setToolBarSize( myToolbar, {w32TB_HEIGHT, w32TB_BUTTONSIZE},
                                     {    38,        {24, 26} })
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    showControlSet
    (integer id)

    Makes visible all the controls in the identified set, and hides the previously shown set.

    Category: Controls

    id is the id of a ControlSet created by setControlSet

    Example:

          sequence FuncGroup
          sequence TriggerGroup
          constant CustomerGrp=1, OrderGrp=2, InventGrp=5, AdminGrp=7
    

    setControlSet(CustomerGrp, w32True, {Fld1, Fld2, Fld3}) setControlSet(OrderGrp, w32True, {Fld11, Fld12, Fld13, Fld14}) setControlSet(InventGrp, w32True, {Fld21, Fld22}) setControlSet(AdminGrp, w32True, {Fld31, Fld32, Fld33}) TriggerGroup = {Btn1, Btn2, Btn3, Btn4} FuncGroup = {CustomerGrp, OrderGrp, InventGrp, AdminGrp}

    procedure Click_Buttons(integer self, integer event, sequence parms) showControlSet( FuncGroup[ find(self, TriggerGroup) ] ) end procedure setHandler(TriggerGroup, w32HClick, routine_id("Click_Buttons"))

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    SimpleCombo

    Simple combo box control.

    Category: Controls

    A SimpleCombo is a combo box with no dropdown. The user can select from various values by using the cursor keys.

    A SimpleCombo has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • CBS_SIMPLE: has a list of values
  • CBS_HASSTRINGS: contains string values
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    SortedCombo

    Sorted combo box control.

    Category: Controls

    A SortedCombo is a combination of an edit control and a list.

    A SortedCombo has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_VSCROLL: attach a vertical scroll bar
  • CBS_DROPDOWN: the list can drop down, like a menu
  • CBS_HASSTRINGS: contains string values
  • CBS_SORT: sorted
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    SortedList

    Sorted list control.

    Category: Controls

    A SortedList contains a list of items, arranged in alphabetical order. To have an unsorted list, use the List control instead.

    A SortedList has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • LBS_NOTIFY: notify parent of events
  • LBS_SORT: sort items in list
  • WS_VSCROLL: attach a vertical scroll bar
  • WS_BORDER: draw a border on the control
  • WS_TABSTOP: the control can be tabbed to
  • WS_EX_CLIENTEDGE: 3D effect
  • WS_EX_ACCEPTFILES: drag and drop support

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    StatusBar

    Window status bar control.

    Category: Controls

    A StatusBar is a control placed at the bottom of the window that status messages can be written into. The status bar is implemented using the Win32 common control toolbar.

    When the parent window is resized, Win32Lib automatically repositions the StatusBar.

    Note that the status bar occupies space like any other control. To determine what portion of the window's client area is not occupied by the statusbar (and toolbar), use the getClientRect function.

    A StatusBar has the following attributes:

  • CCS_BOTTOM: place on bottom of the window
  • WS_CHILD: child control of parent
  • WS_BORDER: draw a border
  • WS_CLIPSIBLINGS: clip child controls

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    TabControl

    Tab Control.

    Category: Controls

    A TabControl is a container control. It can have one or more TabItems. Selecting a TabItem in a TabControl activates it, and displays any controls that are associated with it.

    Since the TabControl is a container, controls can be placed into it, just like placing them into a window. However, it becomes the coder's responsibility to show and hide various controls as different TabItems are selected. It is easier to associate controls with TabItems, since Win32Lib will automatically take care of those details.

    The TabControl has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • WS_CLIPCHILDEN: controls not fitting on the TabControl are clipped.
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    TabItem

    Tab on a TabControl.

    Category: Controls

    A TabItem is a tab attached to the top of a TabControl. TabItems respond to being selected by triggering an onClick event.

    Items can be automatically displayed in a TabControl by setting their owner to the TabItem instead of the TabControl. Win32Lib will automatically reparent controls with TabItems to the TabControl, and maintain a logical association between them. For example:

      constant
        Win     = create( Window, "Testing", 0, Default, Default, 100, 100, 0 ),
        Tabs    = create( TabControl, "", Win, 10, 10, 80, 80, 0 ),
        Tab1    = create( TabItem, "Tab Number &1", Tabs, 0, 0, 0, 0, 0 ),
        Tab2    = create( TabItem, "Tab Number &2", Tabs, 0, 0, 0, 0, 0 ),
        Button1 = create( PushButton, "Button 1", Tab2, 10, 60, 80, 40, 0 )
    

    In the example above, Button1 is created in Tabs (the parent of Tab2). When Tab2 is clicked, it will appear in Tabs at {10,60}. When Tab1 is clicked, it will disappear from Tabs.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    tab_direction
    (integer id, integer direction )

    Moves focus ahead or back to next available focus item

    Category: Controls

    id is the control that is your reference point.
    direction is the number of items to 'tab' over to. Negative values move backward while postive values move forward.

    Example:

          -- Tab forward to the next item that can take focus.
          tab_direction(Fld1, 1)
    

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ToggleButton

    Toggle button control.

    Category: Controls

    A ToggleButton is a PushButton that behaves like a CheckBox - clicking it toggles it down, clicking again toggles it back up. It is typically used in a ToolBar.

    This can show either an Icon or a Bitmap. The choice is made when the control is created using the create() routine. When being created, the style parameter is used to designate the image and format of images on the button. The style parameter can be one of ...

  • w32PB_BITMAP which indicates that the application will later explicitly set a bitmap image to the button.
  • 0 which is the same as w32PB_BITMAP
  • w32PB_ICON which indicates that the application will later explicitly set an icon image to the button.
  • A handle to a pre-loaded bitmap image.
  • A handle to a pre-loaded icon image.
  • A filename to either a .BMP or a .ICO file.

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_PUSHBUTTON: button style is pushbutton
  • BS_BITMAP: displays a bitmap
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    TogglePicture

    Toggle button with graphic control.

    Category: Controls

    A TogglePicture is a combination of a ToggleButton and a PictureButton. The graphic can be specified by passing the name or address of a bitmap in the flags parameter, or with setBitmap, setIcon

    This can show either an Icon or a Bitmap. The chice is made when the control is created using the create() routine.

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_PUSHBUTTON: button style is pushbutton
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ToolBar

    Window toolbar control.

    Category: Controls

    A ToolBar is a container at the top of a window that can hold other controls - typically PushButtons or ToggleButtons. Toolbars are implemented using the Win32 common control toolbar.

    When the parent window is resized, Win32Lib automatically repositions the ToolBar.

    Note that the toolbar occupies space like any other control. To determine what portion of the window's client area is not occupied by the toolbar (and statusbar), use the getClientRect function.

    A ToolBar has the following attributes:

  • CCS_TOP: place on top of the window
  • CCS_NORESIZE: don't automatically resize (Win32Lib does it)
  • WS_CHILD: child control of parent
  • WS_BORDER: draw a border
  • WS_CLIPSIBLINGS: clip child controls

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    ToolTip

    Creates a ToolTip control.

    Category: Controls

    This is not normally required as one is automatically created for your application whenever you use setHint() or supply tooltip text when creating a control.

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    TreeView

    TreeView

    Category: Controls

    A tree view control is a window that displays a hierarchical list of items, such as the headings in a document, the entries in an index, or the files and directories on a disc. Each item consists of a label and an optional bitmapped image, and each item can have a list of subitems associated with it. By clicking an item, the user can expand and collapse the associated list of subitems.

    See also: addTVItem, deleteItem, hitTestTV

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TriCheckBox, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    TriCheckBox

    Three state checkbox control.

    Category: Controls

    A TriCheckBox is similar to a CheckBox, but it has three states: on, off, or dim.

    A TriCheckBox has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • BS_AUTO3STATE: tri-state check box
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, UpDown, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    UpDown

    UpDown

    Category: Controls

    An Up-Down control is a pair of arrow buttons that the user can click to increment or decrement a vaue, such as a scroll position or a number displayed in a companion control. The value associated with an up-down control is called its current position. An up-down control is most often used with a companion control, which is called a buddy window. The updown control will take care of scroll events automatically.

    There are two ways to set a buddy window:

  • style flag UDS_AUTOBUDDY sets the buddy to the previous control
  • setBuddy( id ) sets control id to the buddy window

    Typical flags for an UpDown control are ...

            w32or_all( {
                        UDS_ALIGNRIGHT,
                        UDS_SETBUDDYINT,
                        UDS_ARROWKEYS,
                        UDS_NOTHOUSANDS  -- Avoids a thousands separator.
                    })
    

    See also: getScrollPos, setBuddy, setScrollPos, setScrollRange

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, VScroll, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    VScroll

    Vertical scrollbar control.

    Category: Controls

    A VScroll has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • SBS_VERT: vertical scroll bar
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VTrackBar, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    VTrackBar

    Vertical track bar control.

    Category: Controls

    A VTrackBar has the following attributes:

  • WS_CHILD: child control of the parent
  • WS_VISIBLE: it is visible
  • TBS_VERT: vertical scrollbar
  • TBS_AUTOTICKS: ticks automatically created
  • TBS_ENABLESELRANGE: range highlighted, triangles at end of range
  • WS_TABSTOP: the control can be tabbed to

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, Window


    Documentation for Win32lib v0.60.6
    Table of Contents

    [const]
    Window

    A Window is a normal Win32 window.

    Category: Controls

    See Also: Bitmap, CancelButton, CheckBox, closeWindow, Combo, ComboBoxEx, CText, DefPushButton, disableControlSet, DropDownList, EditText, enableControlSet, FlatToolbar, getEdit, Group, GroupAdv, hideControlSet, HScroll, HTrackBar, Icon, List, ListView, LText, Menu, MenuItem, MenuSpacer, MleText, MonthCalendar, PictureButton, Pixmap, Popup, Printer, ProgressBar, PushButton, Radio, ReBar, RichEdit, RText, Screen, SepButton, setControlBlocks, setControlSet, setToolBarSize, showControlSet, SimpleCombo, SortedCombo, SortedList, StatusBar, TabControl, TabItem, tab_direction, ToggleButton, TogglePicture, ToolBar, ToolTip, TreeView, TriCheckBox, UpDown, VScroll, VTrackBar