Tags:
create new tag
view all tags

Button Widget Drag Option

The button widget now supports a new @ macro to set a Movable (or Drag) option.

Overview:

The Button Widget now supports the ability to be moved around the screen by the user. This must be set by the designer by defining what --- OPTION value is to be sent if the button is moved. In addition to setting and firing the specified option the values of --- CURSOR ROW and --- CURSOR COLUMN are set to the location the button was moved to. It is assumed that you already know where the Button was originally defined on the screen. For the button to stay in it's new location you must position it there in the Pre-Display Event Point. One technique is to dynamically create the buttons in Pre-Display based on data in your files. In Option Intercept, if the button is moved you can update that data with the new button location from --- CURSOR ROW and --- CURSOR COLUMN, and when screen displays again the generated buttons will be created based on the updated data. Depending on the optional children attached to your image and which option number you choose to fire when moved, you may also have to set --- OPTION to a value to cause the screen to redisplay. Be aware that setting --- OPTION to REDISPLAY will cause the Pre-Display event point to run again, which in turn reloads the --- WIDGET file from the values in the executable module and the moved buttons will return to their original positions. To keep the relocated buttons in the new positions you may need to store the changed information and update the widgets each time Pre-Display is executed.

This option is specified as an @ macro entered into the Label or Tooltip widget fields.

Usage:

@ Macro Specification:

* Set Movable - @SMV=# Sets the Button widget to be movable and causes --- OPTION to be set to USER #. You can use values > 255, but you will have to move --- OPTION to a numeric field to test for them.

Comments:

Read what other users have said about this page or add your own comments.


-- PeteBrower - 2012-03-26

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2014-02-13 - GaryRogers
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback