info("buttonrectangle")
info("buttonrectangle")

The info(“buttonrectangle”) function returns a rectangle defining the edges of the most recently clicked button.

Description

This function returns a rectangle defining the edges of the most recently clicked button object. Of course this function should only be used in a procedure that is triggered by a button (or any other form object that triggers a procedure). The rectangle is in screen relative coordinates (use the xytoxy( function to convert to window or form relative coordinates).

Here’s a rather silly example that times how long it takes the user to move the mouse away from a button.

    local startTime
    startTime=now()
    loop
       nop
    while inrectangle( info("mouse"),info("buttonrectangle"))
    message pattern( now()-startTime,"# second~")

As long as the mouse is over the button, the procedure will whirl around and around doing nothing (remember, the nop statement does no operation). When the mouse moves away from the button, the inrectangle( function goes false and the loop is broken.

Note: This function returns the dimensions of the entire object, even if the visible portion of the button does not extend to the edges of the object.

See Also

- Data Button Object -- is used to create checkboxes and radio buttons.
- Displaying Data in a Grid -- fundamentals of displaying data in a grid (Text List/Matrix).
- draggraybox -- facilitates dragging something around in a form window.
- getbutton -- retrieves the coordinates of the last button that was pressed (in global screen co-ordinates).
- getinternalbutton -- retrieves the coordinates of the last button that was pressed (in form relative coordinates).
- getlocalbutton -- retrieves the coordinates of the last button that was pressed (in window relative coordinates).
- Image Display Data Buttons -- checkboxes and radio buttons created from custom images.
- Image Display Push Buttons -- push buttons created from custom images.
- Matrix Clicking -- handling clicks in a Matrix Object.
- Popup Menu Button Object -- is used to create popup menus anywhere on a form.
- Progress Indicator Object -- is used to create progress indicators
- Push Button Object -- triggers a procedure when it is pushed.
- Scroll Bar Object -- is used to create scroll bars.
- Segmented Button Object -- is used to created segmented buttons.
- Slider Object -- is used to create sliders and knobs.
- Stepper Object -- is used to create numeric steppers for use with Text Editor objects.
- Tab Panel Buttons and Selection -- button options for a Tab Panel Object.
- Tab Panel Object -- switchable tab panels.
- Text List Appearance -- customizing the appearance of a Text List Object.
- Text List Object -- displaying a grid of text.
- Web Browser Object -- is used to display web pages from within a Panorama form.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0