Documentation for Win32lib v0.60.6
Table of Contents

Attributes

These are routines that let you inspect and alter attributes of controls.


For more specialized routines, see:

  • Edit Control: Working with text edit controls ( EditText, MleText ).
  • List Control: Working with lists ( List, SortedList ), combos ( Combo, SortedCombo ), etc.
  • ListView Control
  • MonthCalendar Control
  • RichEdit Control
  • TreeView Control
  • Scroll Control: Working with scrollbars ( HScroll, VScroll ) trackbars ( HTrackBar, VTrackbar ) and the ProgressBar.
  • UpDown Control

  • proc addToBand( id, band )    Add a control id to a RebarBand band
  • proc alignControls( object ids, integer disttype, object pValue)   Set the edge position for a set of controls.
  • func canFocus( object id, integer Flag )   Turns on and off a control's CanFocus property.
  • proc centerControl( integer Id, integer RefId)    Centers Id with respect to RefId
  • proc clearWindow( integer id)    Sets id to its background color
  • proc defineUserProperty( object pControl, object pPropId, object pData)    Defines a user defined property for this control id.
  • proc deleteUserProperty( object pControl, object pPropId)    Deletes a user defined property for this control id.
  • proc destroy( id )    Destroy an object created with the create function.
  • proc distributeControls( sequence ids, integer disttype, object pValue)   Evenly distributes a set of controls.
  • func findChildren(integer id)    Used to find all the children controls contained in the specified id.
  • func findParent(object id)    Used to find the owning control for the specified id.
  • func findParentWindow(integer id)    Used to get the Window id of the control specified by id
  • func getChildren(integer id)    Used to get all the child controls contained in the specified id.
  • func getClientPoint( window, x, y )    Get screen position of point { x, y } in window.
  • func getClientRect( integer ControlId )   Get uncovered portion of the client area.
  • func getClientSize( atom id )    Get the dimensions of id's client area.
  • func getControlInfo(integer id, object pFields)   Get various internal information about a control.
  • func getCtlSize( atom id )    Get the width and height of object.
  • func getFocus( )   Gets the id of the control that has focus.
  • func getHint(integer id)   Find the hint text for a control, or the caption for a flattoolbar button
  • func getParent(object id)    an alias for findParent
  • func getPosition( object )    Get the location of object.
  • func getRect( atom id )    Get the dimensions of id.
  • func getSelf()   Get the id number of the current active control.
  • func getUserProperty( object pControl, object pPropId)    Retrieves data from a user defined property for this control id.
  • func getWindowInfo(integer id, object pFields)   Get various information about a window.
  • func getWindowRect( id )    Dimensions of window id.
  • func isEnabled( integer id )    Returns the enabled state of object.
  • func isMaximized( object )    Used to see if the window object is maximized (zoomed) or not.
  • func isMinimized( object )    Used to see if the window object is minimized (iconic) or not.
  • func isScreenPointIn( control, x, y )    Return w32True if the screen point { x, y } is within control.
  • func isTopLevelWindow(integer id)    Used to determine if the id is a Window that acts independantly of other windows.
  • proc isVisible( object )    Returns the visibility state of object.
  • proc makeFront(object id)   Brings to control to the front
  • proc moveZOrder( integer id, atom ztype)    Move id to up or down the of Z order of windows.
  • proc openDialog( object id )    Opens a window, id, as a modal dialog.
  • proc openWindow( window, style )   Opens a window
  • proc popup( popupMenu, x, y )    Display popupMenu at { x, y }.
  • proc refreshWindow( object ids )   Forces the control(s) to be refreshed.
  • proc registerHotKey( integer id, object caption )   Allows you to associate a ALT-key combination to set focus to a control.
  • proc resetUserProperty( object pControl, object pPropId)    Initializes a user defined property for this control id.
  • proc setClientRect( integer id, object width, object height )   Sets the size of the client area in a window.
  • proc setCtlPosition( integer id, object x, object y )   Sets the location of the control.
  • proc setCtlSize( integer control, object Width, object Height )    Resizes control to Width and Height.
  • proc setEnable( object id, atom flag )    Enable or disable id.
  • func setErasePolicy(integer id, integer Flag)    Sets and gets the Background Erasing policy for the control id
  • proc setFocus( id )   Set the focus to the specified window or control.
  • proc setHint( object control, object text )   Set the tooltip text for a control.
  • proc setHintEx( object control, object text, atom exflags )   Set the tooltip text for a control.
  • func setHintWidth(integer id, integer width)   Sets the maximum width, in pixels, of the control's tooltip box.
  • proc setReadOnly( integer id, integer YesNo )   Sets the read-only state of an edit control.
  • func setReBarAutoSizing( integer Flag)    Sets/Gets the automatic resizing facility for ReBar controls.
  • proc setRect( control, left, top, width, height, repaint )    Move and resize control.
  • proc setSubFields( integer pID, sequence pPartInfo )   Defines the sub-fields, or panels, in a status bar.
  • func setTabStops(integer id, sequence flds)   This establishes the controls in a containing control that get tabbing focus.
  • proc setUserProperty( object id, object PropId, object Data)    Stores data into a user defined property for this control id.
  • proc setVisible( object id, atom flag )    Make id visible or invisible.
  • proc setWindowBackColor( object id, object Color )    Sets id to color.
  • proc setWindowRect( integer id, sequence Rect )    Sets the dimensions of window id.
  • proc showWindow( window, style )    Shows a window according to the style
  • proc sizeControls( object ids, object disttype, object pValue)   Set the size for a set of controls.

    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    addToBand
    ( id, band )

    Add a control id to a RebarBand band

    Category: Attributes

    See Also: alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    alignControls
    ( object ids, integer disttype, object pValue)

    Set the edge position for a set of controls.

    Category: Attributes

    ids is a sequence of ids to change
    disttype is one of, or a list of ...

  • w32LeftEdge
  • w32RightEdge
  • w32TopEdge
  • w32BottomEdge
  • w32VertCentre
  • w32HorzCentre
  • w32LeftMost
  • w32RightMost
  • w32TopMost
  • w32BottomMost

    pValue, if used with the ...Most options, is the minimum position. When used with the other options it is the exact position to use. It can be a pixel value or an id value in a sequence.

    Example

          -- Align them all to fld3's left edge.
          alignControls({fld1,fld3,fld4,fld7}, w32LeftEdge, {fld3})
    

    -- Move these up to whatever among them is the topmost fld. alignControls({fld2,fld0,fld9,fld5}, w32TopMost, 0 )

    -- Center fld9 with respect to the screen alignControls(fld9, {w32VertCentre,w32HorzCentre}, {Screen} )

    See Also: addToBand, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    canFocus
    ( object id, integer Flag )

    Turns on and off a control's CanFocus property.

    Returns: OBJECT: Current canFocus status.

    Category: Attributes

    If flag is w32True, the control id is set to have CanFocus, otherwise it is set off. The default for controls is on.

    If id is a single control id, then the return value is a integer.
    If id is a sequence of controls, then the return value is a sequence containing one status flag per control referenced in id.

    id can be either a single control id or a list of ids in a sequence.

    CanFocus means that when the control gets focus, and if it's CanFocus property is off, then the focus is not set.

    Example:

          sequence asv
          asv = canFocus({fldName, fldAddress}, w32False)
    

    See Also: addToBand, alignControls, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    centerControl
    ( integer Id, integer RefId)

    Centers Id with respect to RefId

    Category: Attributes

    Example:

          centerControl(CustDialog, Screen)
          centerControl(BtnX, CustDialog)
    

    See Also: addToBand, alignControls, canFocus, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    clearWindow
    ( integer id)

    Sets id to its background color

    Category: Attributes

    This is used to wipe a Window or Pixmap Example:

               clearWindow( MyWindow )
               clearWindow( MyPixmap )
    

    See Also: addToBand, alignControls, canFocus, centerControl, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    defineUserProperty
    ( object pControl, object pPropId, object pData)

    Defines a user defined property for this control id.

    Category: Attributes

    pControl specifies either a single control id or a list of control ids
    pPropId specifies a unique 'name' for the property.
    pData is the data used to initialize the property. This value is also used by resetUserProperty.

    This is used to create a property or attribute of a control that is not standard. You can use this property however you like. The most common usage is to store information for specific controls that are not normally tracked.

    Example:

          -- Create a property called 'OrigValue' for three controls.
          defineUserProperty({fldName, fldAddr, fldPhone},
                              "OrigValue", "")
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    deleteUserProperty
    ( object pControl, object pPropId)

    Deletes a user defined property for this control id.

    Category: Attributes

    pControl specifies the id of the control. This can be either a single id, or a list of ids in a sequence.
    pPropId specifies a property defined by an early call to defineUserProperty.

    Examples:

          deleteUserProperty(fldX, "Animation")
          deleteUserProperty( {fldA, fldB, fldC}, "TimeOut")
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    destroy
    ( id )

    Destroy an object created with the create function.

    Category: Attributes

    When a control is destroyed, it releases its resources back to Windows. This also means that a parent control also destroys its child controls.

    When the control being destroyed is a Window, it cannot be reopened. If you want to be able to reopen a window, use closeWindow() instead of destroy().

    When this is called, but before the control is actually destroyed, the w32HDestroy event is triggered, enabling you to clean up things associated with this control. Or even prevent the control from being destroyed, by returning -1 from the event handler.

    The following will destroy a pushbutton called MyButton.

          -- destroy a pushbutton
          destroy( MyButton )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    distributeControls
    ( sequence ids, integer disttype, object pValue)

    Evenly distributes a set of controls.

    Category: Attributes

    ids is the set of controls to distribute. There must be at least two ids in the sequence.
    disttype is the type of distribution required. It can be one of...

  • w32HorzCentre : The left edges are distributed evenly.
  • w32HorzGap : The gap between right & left edges are equally.
  • w32VertCentre : The top edges are distributed evenly.
  • w32VertGap : The gap between bottom & top edges are equally. pValue is maximum distance that can span the controls. If this is 0 it is ignored. Otherwise it can be a pixel measurement, or a single control id inside a sequence. See examples for details. If pValue is zero, then the maximum distance is the largest distance between the controls in ids.

    Examples

          -- Move these fields such that the horizontal gap between
          -- each is the same amount. In this case, fld1 and fld3 remain
          -- still while fld2 is centered between them.
          distributeControls( {fld1, fld2, fld3}, w32HorzGap, 0)
    

    -- Move these fields such that the horizontal gap between -- each is the same amount. In this case, only fld1 remains -- still while fld2 and fld3 are moved such that the distance -- between fld1 and fld3 is 200 pixels. distributeControls( {fld1, fld2, fld3}, w32HorzGap, 200)

    -- Move these fields such that the horizontal gap between -- each is the same amount. In this case, only fld1 remains -- still while fld2 and fld3 are moved such that the distance -- between fld1 and fld3 is the width of fld4. distributeControls( {fld1, fld2, fld3}, w32HorzGap, {fld4} )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    findChildren
    (integer id)

    Used to find all the children controls contained in the specified id.

    Returns: SEQUENCE: Zero or more subsequences {id, controlType}.

    Category: Attributes

    Each subsequence returned has the control id and the control's type, for all the controls owned by id.
    It returns an empty sequence if the id has no children.

    see getChildren

    Example

        sequence children
        -- Get a list of all the controls owned by this window
        children = findChildren(myWin)
    

    -- Set the caption for each of the PushButtons. for i = 1 to length(children) do if find(children[i][2],{PushButton,DefPushButton}) then setText(children[i][1], sprintf("Button%d", i)) end if end for

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    findParent
    (object id)

    Used to find the owning control for the specified id.

    Returns: The id of the control that owns the one specified.

    Category: Attributes

    This can be used for TreeView items as well by using the syntax for id as { TV, TVItemId }

    If the id has no parent, this function returns 0.
    If the id is invalid, this function returns -1.

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    findParentWindow
    (integer id)

    Used to get the Window id of the control specified by id

    Returns: The id of the Window or zero if this id is not in a window.

    Category: Attributes

    --------------------------------------------------------

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getChildren
    (integer id)

    Used to get all the child controls contained in the specified id.

    Returns: SEQUENCE: Contains two subsequences {{idlist}, {controlTypes}}.

    Category: Attributes

    The first subsequences is a list of all the child controls' ids.
    The second subsequence is a list of their corresponding control type codes.
    It returns an empty subsequences if the id has no children.

    see findChildren

    Example

        sequence children
        -- Get a list of all the controls owned by this window
        children = getChildren(myWin)
    

    -- Set the caption for each of the PushButtons. for i = 1 to length(children) do if find(children[2][i],{PushButton,DefPushButton}) then setText(children[1][i], sprintf("Button%d", i)) end if end for

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getClientPoint
    ( window, x, y )

    Get screen position of point { x, y } in window.

    Returns: { screen x, screen y }

    Category: Attributes

    This routine handles relative positions similar to the create() routine

    Example:

          -- where does {0.50, 10} in MyWindow appear on the screen?
          sequence point
    

    -- get the screen position point = getClientPoint( MyWindow, 0.50, 10 )

    -- display the size wPrintf( MyWindow, "The point {0.50,10} maps to {%d, %d on the screen"}, point )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getClientRect
    ( integer ControlId )

    Get uncovered portion of the client area.

    Returns: { left, top, width, height, bottom, right }

    Category: Attributes

    Unlike the menu, toolbar and statusbar both occupy space in the window. To determine what part of the window's client area is not covered, use this function. This function can be used even if there is no toobar or statusbar in the window.

    For example, the generic demo has a MleText that needs to be resized every time the window is resized. It uses getClientRect to determine the metrics of the MleText.

              -- color the unoccupied portion of the window red
              sequence rect
    

    -- find out what portion of the window is available rect = getClientRect( TheWindow )

    -- draw a filled rectangle setPenColor( TheWindow, Red ) drawRectangle( TheWindow, w32True, rect[1], rect[2], rect[1]+rect[3], rect[2]+rect[4] )

    ---------------------------------------------------------------------------

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getClientSize
    ( atom id )

    Get the dimensions of id's client area.

    Returns: Sequence: { Screen.left, Screen.top, right, bottom }

    Category: Attributes

    The returns the pixel positions of the top-left corner, relative to the screen and the width and height of the client area. For Screen, Printer and Pixmap the top-left is always 0,0

    Example:

          -- where is the button located?
          sequence extent
    

    -- get the extent of the button extent = getClientSize( MyButton )

    -- display the position wPrintf( MyWindow, "MyButton is at %d,%d and width=%d, height=%d", extent )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getControlInfo
    (integer id, object pFields)

    Get various internal information about a control.

    Returns: SEQUENCE: A list of the requested field values.

    Category: Attributes

    id is the id of a control that you want information from.
    pFields is a list of fields whose value can be requested.

    CONTROLINFO_handle
    Windows hWnd value of control
    CONTROLINFO_handle_type
    Type of handle
    Window = 1
    Bitmap = 2
    Menu = 3
    TabItem = 4
    ImageList = 5
    CONTROLINFO_destroyed
    true if destroyed
    CONTROLINFO_func
    Long pointer to function
    CONTROLINFO_class
    control class
    CONTROLINFO_classinfo
    control class info used during create
    The returns a sequence that contains...
    • Name : The name of the registered Window Class
    • Type : The family of controls. Possible values are: WINDOW, BUTTON, COMBO, EDIT, LISTBOX, SCROLLBAR, STATIC, MENU, POPUP, MENUITEM, PIXMAP, COMMON_CONTROL
    • Style : The default Style Flags used by createEx()
    • StyleEx: The default Extended Style Flags used by createEx()
    • Attributes: The win32lib attributes of this control. Possible values are:
      w32Clickable: Can allow mouseup detection to fire onClick handler
      w32NoConv: Must not allow relative dimension conversions
      w32PictCtrl: Controls that pass bitmaps in the flags
      w32CtrlTab: CTRL-tabkey must be used to move tabstops
    • Background Color : The default background color
    • Foreground Color : The default foreground color
    • Pointer : The default mouse pointer shape.
    CONTROLINFO_type
    win32lib type
    CONTROLINFO_focus_order
    focus order of controls
    CONTROLINFO_focus
    current focus
    CONTROLINFO_owner
    owner
    CONTROLINFO_menu
    menu in window
    CONTROLINFO_popup
    atached popup menu for the control
    CONTROLINFO_notifyid
    a list of ids that wish to be notified of events that happen to this control.
    CONTROLINFO_toolbar
    toolbar in window
    CONTROLINFO_statusbar
    statusbar in window
    CONTROLINFO_tooltip
    tooltip text or flattoolbar button's caption
    CONTROLINFO_font
    font resource
    CONTROLINFO_fcolor
    foreground color
    CONTROLINFO_bcolor
    background color
    CONTROLINFO_pen
    pen: { id, color, style }
    CONTROLINFO_x
    x position
    CONTROLINFO_y
    y position
    CONTROLINFO_erase
    True if application is responsible for erasing the window background.
    CONTROLINFO_scroll
    scroll: { small change, large change }
    CONTROLINFO_range
    scroll range { low, high }
    CONTROLINFO_tabitems
    tabs in tab control
    CONTROLINFO_group
    items owned by this window, regardless whether they are in the tab order or not.
    CONTROLINFO_cursor
    cursor associated with window
    CONTROLINFO_hotkey_keys
    hotkeys associated with the window
    CONTROLINFO_hotkey_ids
    ids associated with hotkeys
    CONTROLINFO_textalign
    alignment of text
    CONTROLINFO_closed
    true if window has been closed.
    CONTROLINFO_tabenabled
    true if control uses raw tab keys, false if CTRL-tabkey must be used.
    CONTROLINFO_eventhandler
    Routine IDs for event handlers.
    CONTROLINFO_bbrush
    The current Brush used to paint a control's background.
    CONTROLINFO_cursor
    The stack of cursor's used to set the current cursor shape
    CONTROLINFO_tag
    The current set of user defined properties for the control.
    CONTROLINFO_name
    The current user defined name for the control.
    CONTROLINFO_deferredhandlers
    The current set of unresolved event handlers for the control.
    CONTROLINFO_autoheight
    Is this an automatic height resizing control
    CONTROLINFO_autowidth
    Is this an automatic width resizing control
    CONTROLINFO_init
    Contains the initial Rect data for children controls if there is a toolbar in the window
    CONTROLINFO_mousetrap
    Contains a list of the defined mousetraps for a control.

    Example:

           sequence lValues
           lValues = getControlInfo(myWin,
                          {CONTROLINFO_handle,
                           CONTROLINFO_owner,
                           CONTROLINFO_type
                          })
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getCtlSize
    ( atom id )

    Get the width and height of object.

    Returns: SEQUENCE: { width, height }

    Category: Attributes

    Example:

          -- how large is TheButton?
          sequence size
    

    -- get the size of TheButton size = getCtlSize( TheButton )

    -- display the size wPrintf( MyWindow, "TheButton is %d by %d"}, size )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getFocus
    ( )

    Gets the id of the control that has focus.

    Returns: INTEGER: The id of the control that has focus.

    Category: Attributes

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getHint
    (integer id)

    Find the hint text for a control, or the caption for a flattoolbar button

    Returns: Any Tool Tip text associated with this id

    Category: Attributes

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getParent
    (object id)

    an alias for findParent

    Returns: The id of the control that owns the one specified.

    Category: Attributes

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getPosition
    ( object )

    Get the location of object.

    Returns: { left, top }

    Category: Attributes

    Example:

          -- Where is TheButton?
          sequence posn
    

    -- get the position of TheButton posn = getPosition( TheButton )

    -- display the position wPrintf( MyWindow, "TheButton is at %d, %d}, posn )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getRect
    ( atom id )

    Get the dimensions of id.

    Returns: Sequence: { left, top, right, bottom }

    Category: Attributes

    The returns the pixel positions of the top-left corner and the bottom right corner. For Screen, Printer and bitmaps the top-left is always 0,0 and thus right is the width and bottom is the height.

    Example:

          -- where is the window located?
          sequence extent
    

    -- get the extent of the window extent = getRect( MyWindow )

    -- display the position wPrintf( MyWindow, "MyWindow is located at %d,%d }, extent[1 .. 2] )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getSelf
    ()

    Get the id number of the current active control.

    Returns: (INTEGER) id of active control. Zero if no control is active.

    Category: Attributes

    This is used by event handlers to find out which control was active when the event was invoked.

    Example

          procedure Clicker()
            integer lSelf
    

    lSelf = getSelf() if lSelf = btnOne then ... else ... end if end procedure

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getUserProperty
    ( object pControl, object pPropId)

    Retrieves data from a user defined property for this control id.

    Category: Attributes

    ret Sequence: The contents of the user defined property. pControl specifies the id of the control. This can be either a single id, or a list of ids in a sequence.
    pPropId specifies a property defined by an early call to defineUserProperty.
    The data isreturned as the first, and only, element in a sequence. If an empty sequence is returned, it means that the specified property has not been defined for this control.
    If id is a sequence, then the returned sequence contains two subsequences. The first is alist of the returned property values and the second is a list of w32True/w32False values; one per control listed in id. A w32True indicates that the respective control has this property set and w32False indicates that it has not been set.

    Examples:

          sequence lValues
          lValues = getUserProperty(fldX, "Animation")
          if length(lValues) = 0 then
              -- No value, so use a default.
              lValues = {20}
          end if
          -- NB: The property value is always in element [1]!
          doAnimation( lValues[1] )
    

    This next example shows how to get the property values from a list of controls

          sequence lValues
          sequence lFlds
    

    lFlds = {fldA, fldB, fldC} lValues = getUserProperty( lFlds, "TimeOut") for i = 1 to length(lValues) do if lValues[2][i] = w32False then -- Provide a default value then. lValues[1][i] = 5 end if -- Process the property value which is in lValues[1][i] doSomethingClever( lFlds[i], lValues[1][i]) end for

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getWindowInfo
    (integer id, object pFields)

    Get various information about a window.

    Returns: SEQUENCE: A list of the requested field values.

    Category: Attributes

    id is the id of a window that you want information from.
    pFields is a list of fields whose value can be requested.

    WINDOWINFO_WLeft
    The Window border's left pixel position
    WINDOWINFO_WTop
    The Window border's top pixel position
    WINDOWINFO_WRight
    The Window border's right pixel position
    WINDOWINFO_WBottom
    The Window border's bottom pixel position
    WINDOWINFO_CLeft
    The Window client area's left pixel position
    WINDOWINFO_CTop
    The Window client area's top pixel position
    WINDOWINFO_CRight
    The Window client area's right pixel position
    WINDOWINFO_CBottom
    The Window client area's bottom pixel position
    WINDOWINFO_Style
    The Window style flags
    WINDOWINFO_ExStyle
    The Window extended style flags
    WINDOWINFO_WindowStatus
    The Window's activation status. Zero = not-active.
    WINDOWINFO_xWindowBorders
    The width, in pixels, of the window border.
    WINDOWINFO_yWindowBorders
    The height, in pixels, of the window border.
    WINDOWINFO_WindowType
    The window class atom. Used in Win32 CreateWindow() calls.
    WINDOWINFO_CreatorVersion
    The version of Windows 32 that created this window.

    Example:

           sequence lValues
           lValues = getWindowInfo(myWin,
                          {WINDOWINFO_WLeft,
                           WINDOWINFO_WTop,
                           WINDOWINFO_WindowStatus
                          })
           printf(o, "Window is at %d, %d and is %s",
                 {lValues[1], lValues[2],
                  w32iff(lValues[3], "active", "inactive")})
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    getWindowRect
    ( id )

    Dimensions of window id.

    Returns: { left, top, right, bottom }

    Category: Attributes

    Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    isEnabled
    ( integer id )

    Returns the enabled state of object.

    Returns: INTEGER: Zero if no enabled, Non-zero if enabled.

    Category: Attributes

    Note: A TabItem is always enabled. Example:

              -- is TheButton enabled?
              integer flag
    

    flag = isEnabled( TheButton )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    isMaximized
    ( object )

    Used to see if the window object is maximized (zoomed) or not.

    Category: Attributes

    Example:

              -- Restore a maximized window?
              if isMaximized( myWindow ) then
                  showWindow( myWindow, SW_RESTORE)
              end if
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    isMinimized
    ( object )

    Used to see if the window object is minimized (iconic) or not.

    Category: Attributes

    Example:

              -- Restore a minimized window?
              if isMinimized( myWindow ) then
                  showWindow( myWindow, SW_RESTORE)
              end if
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    isScreenPointIn
    ( control, x, y )

    Return w32True if the screen point { x, y } is within control.

    Returns: w32True if point { x, y } is within control.

    Category: Attributes

    This is used for hit testing, to determine if a point lies on a control.

    Example:

              -- check if screen point {10,10} lies in MyWindow
               if isScreenPointIn( MyWindow, 10, 10 ) then
                  -- point is in MyWindow
              end if
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    isTopLevelWindow
    (integer id)

    Used to determine if the id is a Window that acts independantly of other windows.

    Returns: INTEGER: w32True or w32False

    Category: Attributes

    Example:

          if isTopLevelWindow(xx) then
              moveWindow(  . . . )
          end if
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    isVisible
    ( object )

    Returns the visibility state of object.

    Category: Attributes

    Note: A TabItem is always visible. Example:

              -- is TheButton visible?
              integer flag
    

    flag = isVisible( TheButton )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    makeFront
    (object id)

    Brings to control to the front

    Category: Attributes

    id can either be a control's id value or take the form {hWnd}.

    Example:

          atom hwnd_MsgWindow
          hwnd_MsgWindow = getHandle(MsgWindow)
          . . .
          -- Using a control id
          makeFront( GroupX )
          -- Using a hWnd
          makeFront( {hwnd_MsgWindow} )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    moveZOrder
    ( integer id, atom ztype)

    Move id to up or down the of Z order of windows.

    Category: Attributes

    ztype can be one of HWND_TOP, HWND_BOTTOM, HWND_TOPMOST or HWND_NOTOPMOST, or another control id.

    Example:

              -- change the order of this window.
              moveZOrder( msgWindow,  HWND_TOPMOST)
    

    -- move id in front of id2 moveZOrder( id, id2)

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    openDialog
    ( object id )

    Opens a window, id, as a modal dialog.

    Category: Attributes

    The id is either a control id, a two-element sequence containing {control id, focus id}.

    -There is a difference between this and openWindow(..., Modal). Here's some examples....

        while length(filename) = 0 do
            openWindow(myFileDialog, Modal)
        end for
    
    and
        while length(filename) = 0 do
            openDialog(myFileDialog)
        end for
    

    In the first snippet, this would start a very tight loop in which the user could not enter data. This is because the openWindow() would execute and not wait for the user to enter any data into the new window before executing the while test again. Whereas the openDialog() routine opens a modal window then waits for that window to close before executing the line after the openDialog() statement. During this time, any event handlers set up for the dialog window would still fire correctly.

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    openWindow
    ( window, style )

    Opens a window

    Category: Attributes

    window is either a control id, a two-element sequence containing {control id, focus id}, or the name of a Window control.

    If window is a Window then the style flag is one of the following:

  • Normal: Original size.
  • Minimize: Minimized into the task bar.
  • Maximize: Fills screen.
  • Modal: Original size, but no other application window can get focus until this window is closed. Use to emulate modal dialogs.
  • Win32 Flag: For example, SW_SHOWMINNOACTIVE.

    The openWindow function will trigger an w32HOpen event before it is opened and a w32HActivate event after it is opened.
    If the w32HOpen event calls returnValue(-1), the window is not opened.

    It it possible to specify the control that will get the initial focus when the window opens. To do this, the window parameter must be specified in the form {window_id, focus_id}. If the focus_id is zero, then the first Edit type control is given focus. If there are no edit boxes, then the first button type control is given focus. If you don't specify the initial focus control, then the control that last had focus in the window is used.

    Example:

          -- Open the Login window, giving focus to the User ID field.
          openWindow({formLogin txtUserId}, Normal)
    

    -- Open the Messages window. openWindow("Message List", Normal)

    -- Open an input form openWindow(vPromptCust, {"Name","<unknown>"} )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    popup
    ( popupMenu, x, y )

    Display popupMenu at { x, y }.

    Category: Attributes

    The coordinates x and y are relative to the parent window of the popup menu. If you are trapping the mouse position relative some other control, you will need to pass both the id of the popup menu and the reference control for the coordiniates passed. This is done by passing the first parameter as a 2-element sequence {popup, controlId}.

    Example: Hard coded location relative to parent window.

    -- create a popup for MyWindow constant MyPopup = create( Popup, "", MyWindow, 0, 0, 0, 0, 0 )

    -- add four items into it constant Item1 = create( MenuItem, "Item 1", MyPopup, 0, 0, 0, 0, 0 ), Item2 = create( MenuItem, "Item 2", MyPopup, 0, 0, 0, 0, 0 ), Item3 = create( MenuItem, "Item 3", MyPopup, 0, 0, 0, 0, 0 ), Item4 = create( MenuItem, "Item 4", MyPopup, 0, 0, 0, 0, 0 )

    -- popup the menu at {10,10} in MyWindow popup( MyPopup, 10, 10 )

    Example: Location relative to some other control.

        --------------------------------
        procedure Mouse_TV(integer self, integer event, sequence parms)
        --------------------------------
            integer index
    

    if parms[1] = WM_RBUTTONDOWN then -- The coordinates are relative to self and -- not the parent window. popup({TVPopup, self}, parms[2], parms[3] ) end if

    end procedure

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    refreshWindow
    ( object ids )

    Forces the control(s) to be refreshed.

    Category: Attributes

    ids can be either a single control id or a sequence of ids.

    Example:

          refreshWindow({btn1, btn2})
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    registerHotKey
    ( integer id, object caption )

    Allows you to associate a ALT-key combination to set focus to a control.

    Category: Attributes

    Any control or Window can have any number of hotkeys registered.
    id is the control/window id returned by create()
    caption is either a single keycode, or a string containing a '&' character.
    If using a keycode, you must use the keycode names in w32Keys.e. If using a string, the uppercase version of the character following the '&' is used. Note that this is happens automatically when you create() a control with some caption text. Also, the default pushbutton, if any, is automatically registered with VK_RETURN.

    Typical use of this procedure is when a control is created without a caption.

    example:

           -- Attached the '+' keys to the addBtn control.
           registerHotKey( addBtn, VK_ADD)
           registerHotKey( addBtn, VK_OEM_PLUS)
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    resetUserProperty
    ( object pControl, object pPropId)

    Initializes a user defined property for this control id.

    Category: Attributes

    pControl specifies either a single control id or a list of control ids
    pPropId specifies a property defined by an early call to defineUserProperty. The property is reset to the initial value originally supplied when defined with defineUserProperty.

    Example:

          -- Set the original values back to their initial value.
          resetUserProperty({fldName,fldAddr, fldPhone}, "OrigValue")
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setClientRect
    ( integer id, object width, object height )

    Sets the size of the client area in a window.

    Category: Attributes

    The client area is the area used by the application. It excludes toolbar, statusbar, menu area, etc...
    After using this routine, the window will be larger than the dimensions specified here. Use getRect() to retrive to total window area.

    Example

           --Set the client area to exactly 300 by 200 pixels
           setClientRect(myWindow, 300, 200)
    
    ----------------------------

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setCtlPosition
    ( integer id, object x, object y )

    Sets the location of the control.

    Category: Attributes

    Example

          setCtlPosition( myBtn, 100, 200)
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setCtlSize
    ( integer control, object Width, object Height )

    Resizes control to Width and Height.

    Category: Attributes

    If either Width or Height has the value w32SameSize then the dimension is unchanged.

    Example:

         -- size Button1 to 60 pixels wide by 32 pixels high
          setCtlSize( Button1, 60, 32 )
         -- size Button2 to 60 pixels wide, leaving the height unchanged.
          setCtlSize( Button2, 60, w32SameSize )
         -- size Button3 to 25 pixels high, leaving the width unchanged.
          setCtlSize( Button3, w32SameSize, 25 )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setEnable
    ( object id, atom flag )

    Enable or disable id.

    Category: Attributes

    id can be a sequence of control ids.

    Example:

              -- disable TheButton
               setEnable( TheButton, w32False )
              -- Disable lists one and two.
               setEnable( {List1, List2}, w32False )
              -- Enable lists three and four.
               setEnable( {List3, List4}, w32True )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    setErasePolicy
    (integer id, integer Flag)

    Sets and gets the Background Erasing policy for the control id

    Returns: INTEGER: The current policy value.

    Category: Attributes

    id is a control id.
    If Flag is negative (eg. -1) then this routine just returns the current policy value. If it is zero it sets the policy that the window's background is automatically cleared to the default color whenever it needs erasing. If it is positive (eg. 1) then the application must take responsibility of erasing the background during a Paint event.

    Example:

          integer oldval
          oldval = setErasePolicy( TickerWin, 1)
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setFocus
    ( id )

    Set the focus to the specified window or control.

    Category: Attributes

    This will cause the window or control that currently has focus to lose it.

    The window or control losing focus will get an onLostFocus event, and the window or control that is getting focus will get an onGotFocus event.

    Controls that are not visible or not enabled, will never receive focus. If you try to, nothing will actually happen.

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setHint
    ( object control, object text )

    Set the tooltip text for a control.

    Category: Attributes

    If the mouse stays still over a control that has tooltip text associated with it, a small window displaying the tooltip text will appear.

    Any control that can get mouse events can have tooltips associated with it, although it tends to work best with PictureButtons, typically in the ToolBar.

    Setting the text to "" effectively removes the tooltip.

    Note: When setting tooltips for multipanelled StatusBar controls, you need to specify which panel the tip applies to. You do this by setting the control parameter as a sequence in the form {id, panel} where id is the StatusBar control and panel is the panel number.

    It is possible to dynamically set the text of a tooltip so that each time the control needs to display a tip, it first calls a routine of your own that must supply the text to display. To do this, set the text parameter to the routine_id of your function. Your function will receive two parameters: ( id, width ) where id is the control that needs a tip, and width is the width of the tooltip box that will be used (in pixels). Your function must return a sequence. That sequence can simply be the tip text, or a 2-element sequence in the form { tiptext, newwidth }.

    Example:

          -- set hint for CloseButton
          setHint( CloseButton, "Closes the window" )
    

    function gettip( integer id, integer width) sequence newtext sequence AccountRecord

    AccountRecord = getAccountFromName(getText(id)) if length(AccountRecord) > 0 then newtext = sprintf("Account %d has a balance of %12.2f", {AccountRecord[fAcctNo], AccountRecord[fCurBal]}) else newtext = "No account found for this name." end if return newtext end function setHint( txtAccountName, routine_id("gettip") )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setHintEx
    ( object control, object text, atom exflags )

    Set the tooltip text for a control.

    Category: Attributes

    This is identical to setHint() except that you can use extra flags when creating the tooltip for a control.

    Example:

          -- set hint for CloseButton
           setHintEx( CloseButton, "Closes the window", TTF_CENTERTIP )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    setHintWidth
    (integer id, integer width)

    Sets the maximum width, in pixels, of the control's tooltip box.

    Returns: INTEGER: Current width setting.

    Category: Attributes

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setReadOnly
    ( integer id, integer YesNo )

    Sets the read-only state of an edit control.

    Category: Attributes

    YesNo is w32True to set it to read-only, and w32False to allow keystrokes.

    Example:

          setReadOnly( myEdit, w32True)
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    setReBarAutoSizing
    ( integer Flag)

    Sets/Gets the automatic resizing facility for ReBar controls.

    Returns: INTEGER: Current Value

    Category: Attributes

    Flag is either w32True to enable Win32Lib to automatically take care of moving controls around relative to the height of the ReBar control, or w32False to disable this facility.

    The current value for this facility is returned. Initially this facility is disabled.

    Example:

          integer CurVal
          -- Enable automatic handling of rebar height changes.
          CurVal = setReBarAutoSizing( w32True )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setRect
    ( control, left, top, width, height, repaint )

    Move and resize control.

    Category: Attributes

    control is moved to x, y, and sized to cx, cy. If the repaint flag is set, the window is repainted.

    To find the current size and position of control, use getRect.

    Example:

              -- move Button1 to 20x20
              sequence size
    

    -- get the current size size = getCtlSize( Button1 )

    -- change the size and repaint setRect( Button1, 20, 20, size[1], size[2], w32True )

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setSubFields
    ( integer pID, sequence pPartInfo )

    Defines the sub-fields, or panels, in a status bar.

    Category: Attributes

    pID must refer to a status bar control.
    pPartInfo is a list of panel size specifiers for each subfield (a.k.a. panel) in the statusbar.
    Each value in this list can be expressed in one of four ways:

  • A positive integer refers to the panels absolute right-hand side pixel position
  • A negitive integer less than -1. This refers to a right-hand side position relative to the window's right-hand edge.
  • An atom > 0 and < 1 refers to the panel's width as a fraction of the window's width (0.25 means 25% of the window width)
  • A sequence (containing one integer) refers to the panel's width in pixels. If the any specification has the value -1, it means that this is the last panel and it extends to the right hand edge of the window.

    You can use setText() and getText() to write and read these panels.

    Example:

           -- This specifies 6 panels.
           -- The first one's rightedge is at pixel 55.
           -- The second is 100 pixels wide.
           -- The third is 10% of the window width.
           -- The 4th is 20 pixels wide.
           -- The 5th is 10 pixels in from the window's RHS.
           -- The last one extends to the window's edge.
           setSubFields(SB, {55, {100}, 0.10, {20},-10,-1})
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    setTabStops
    (integer id, sequence flds)

    This establishes the controls in a containing control that get tabbing focus.

    Returns: SEQUENCE: The list of controls that used to be the tabbing controls.

    Category: Attributes

    id is the Id of a control that contains other controls. Usually a Window, Group, or TabItem.
    The flds parameter specifies a list of control ids. The order of the ids is the new order of tabbing. Any control that is not in this list is ignored by the tabbing process.

    Example:

          sequence OldFlds
          OldFlds = setTabStops(MainWin, {CustName, CustAddr, Telephone,
                                         OKBtn, CancelBtn})
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setUserProperty
    ( object id, object PropId, object Data)

    Stores data into a user defined property for this control id.

    Category: Attributes

    pControl specifies either a single control id or a list of control ids
    PropId specifies a property defined by an early call to defineUserProperty
    Data is any data you wish to store in that property.

    Note: If the property named in PropId hasn't been defined yet for id, this routine will automatically define it, using Data as the default value for it.

    Example:

          -- Set the original values for these fields.
          setUserProperty(fldName, "OrigValue", lRecord[cName])
          setUserProperty(fldAddr, "OrigValue", lRecord[cAddr])
          setUserProperty(fldPhone, "OrigValue", lRecord[cPhone])
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setVisible
    ( object id, atom flag )

    Make id visible or invisible.

    Category: Attributes

    id can also be a sequence of control ids. Example:

              -- make TheButton invisible
               setVisible( TheButton, w32False )
              -- Hide lists one and two.
               setVisible( {List1, List2}, w32False )
              -- Show lists three and four.
               setVisible( {List3, List4}, w32True )
    

    Note: If object is a Window being made visible, it will trigger an onOpen event. However, if it is a Window being made invisible, it will not trigger any event. This should probably be corrected.

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setWindowBackColor, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setWindowBackColor
    ( object id, object Color )

    Sets id to color.

    Category: Attributes

    This is used to change the background color of a window or control.

    id can be a single control id or a list of ids.

    Color can either be an atom with a rgb value or a three-element sequence formated as {red, green, blue} values (0-255).
    You can also use getSysColor to get a default system color. This will trigger an onPaint event.

    Note, this will not effect push buttons.

    Example:

              -- Set the window background color to bright white
               setWindowBackColor( MyWindow, BrightWhite )
              -- Set a list's background color to salmon pink
               setWindowBackColor( List1, {255, 128, 128} )
              -- Set an edit field to look like a button color.
               setWindowBackColor( Edit1, getSysColor(COLOR_BTNFACE) )
              -- Set a group of controls
               setWindowBackColor( {ctl1, ctl2, ctl3}, Cyan)
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowRect, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    setWindowRect
    ( integer id, sequence Rect )

    Sets the dimensions of window id.

    Category: Attributes

    Rect is a sequence containing the { left, top, right, bottom } coordinates of the control.

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, showWindow, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    showWindow
    ( window, style )

    Shows a window according to the style

    Category: Attributes

    window is either a control id or the name of a Window control.

    The style flag is one of the following:

  • SW_HIDE = Hides the window and activates another
  • SW_NORMAL = Restores the window and activates it
  • SW_SHOWMINIMIZED = Minimizes the window and activates it
  • SW_SHOWMAXIMIZED = Maximizes the window and activates it
  • SW_SHOWNOACTIVATE = Displays the window and doesn't activate it
  • SW_SHOW = Displays the window and activates it
  • SW_MINIMIZE = Minimizes the window and activates the next window
  • SW_SHOWMINNOACTIVE = Minimizes the window and doesn't activate it
  • SW_SHOWNA = Displays the window and doesn't activate it
  • SW_RESTORE = Restores the window and activates it
  • SW_MAX = Maximizes the window and doesn't activate it
  • w32FullScreen = Makes the window appear without title bar and without borders, and the client area fills the entire screen.

    Example:

          showWindow(formErrors, SW_HIDE)
          showWindow("Message List", SW_RESTORE)
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, sizeControls


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    sizeControls
    ( object ids, object disttype, object pValue)

    Set the size for a set of controls.

    Category: Attributes

    ids is a sequence of ids to change
    sizetype is one of, or a list of ...

  • w32Height
  • w32Width
  • w32Widest
  • w32Narrowest
  • w32Tallest
  • w32Shortest

    pValue, if used, is the minimum size. It can be a pixel value or an id value in a sequence.

    Example

          sizeControls({fld1,fld3,fld4,fld7}, w32Widest, 200)
          sizeControls({fld2,fld0,fld9,fld5}, w32Tallest, {lblXYZ} )
          -- fld3 and fld2 to the same dimensions as btnOne
          sizeControls({fld3,fld2}, {w32Height,w32Width}, {btnOne} )
    

    See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow