See Also: Attributes
A Bitmap does not respond to events.
A Bitmap has the following attributes:
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
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:
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
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:
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
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
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:
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
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
A CText control does not respond to events.
A CText has the following attributes:
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
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:
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
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
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:
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
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:
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
id is the id of a ControlSet created by setControlSet
Example:
sequence FuncGroup sequence TriggerGroup constant CustomerGrp=1, OrderGrp=2, InventGrp=5, AdminGrp=7setControlSet(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
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
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
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:
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
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 ...
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
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
An HScroll has the following attributes:
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
An HTrackBar has the following attributes:
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
An Icon is a static small graphic. As a static control, it does not respond to events.
An Icon has the following attributes:
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
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:
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
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:
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
An LText control does not respond to events.
An LText has the following attributes:
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
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
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
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
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:
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
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
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 ...
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
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
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
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
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 = 1procedure 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
A PushButton is a normal push button (sometimes called command button). A PushButton has the following attributes:
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
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:
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
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
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
An RText control does not respond to events.
An RText has the following attributes:
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
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
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
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
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
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
id is the id of a ControlSet created by setControlSet
Example:
sequence FuncGroup sequence TriggerGroup constant CustomerGrp=1, OrderGrp=2, InventGrp=5, AdminGrp=7setControlSet(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
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:
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
A SortedCombo is a combination of an edit control and a list.
A SortedCombo has the following attributes:
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
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:
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
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:
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
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:
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
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
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
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 ...
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
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.
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
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:
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
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
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
A TriCheckBox is similar to a CheckBox, but it has three states: on, off, or dim.
A TriCheckBox has the following attributes:
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
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:
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
A VScroll has the following attributes:
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
A VTrackBar has the following attributes:
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
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