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, isE