background image
<< Custom Objects - Evenly sized and spaced controls | Custom Objects - Supporting nongraphical controls >>
Custom Objects - Irregularly sized or spaced controls
<< Custom Objects - Evenly sized and spaced controls | Custom Objects - Supporting nongraphical controls >>
User's Guide
321
17 S
UPPORTING
C
USTOM
O
BJECTS
Supporting graphical controls
(3:26, 1:1)
You append this location to the tag with the forward slash (/) character.
Example To alter the previous declaration for the tool bar so that it becomes
the declaration for the Printer icon, which is the third icon, you write this
declaration:
CustomWin Printer
mswdos tag "[PaintWindow]#1/(3:26, 1:1)"
The declarations for the first seven icons in the tool bar are shown here:
CustomWin FileOpen
mswdos tag "[PaintWindow]#1/(1:26, 1:1)"
CustomWin Save
mswdos tag "[PaintWindow]#1/(2:26, 1:1)"
CustomWin Printer
mswdos tag "[PaintWindow]#1/(3:26, 1:1)"
CustomWin Preview
mswdos tag "[PaintWindow]#1/(4:26, 1:1)"
CustomWin Cut
mswdos tag "[PaintWindow]#1/(5:26, 1:1)"
CustomWin Copy
mswdos tag "[PaintWindow]#1/(6:26, 1:1)"
CustomWin Paste
mswdos tag "[PaintWindow]#1/(7:26, 1:1)"
Using the modified
declaration
Once you create window declarations like these for the graphical objects in
your application, you can manipulate them as you would any other object.
For example, if the tool bar was contained in an application named MyApp,
to click on the FileOpen icon in the tool bar, you use this command:
MyApp.FileOpen.Click ()
Note You need to write this statement--and others that access the
objects declared above, such as Save and Printer--by hand.
Record/Testcase and Record/Actions will not use these identifiers.
Irregularly sized or
spaced controls
If the graphical controls in a group are not the same size or are not evenly
spaced in a grid, you need to specify in the declaration the location suffix of
each control as an exact x,y point. This x,y point typically corresponds to the
center of the object. This syntax is not necessarily cross-platform or
resolution independent.
You specify a location in its declaration as an x,y coordinate using the
following syntax:
(
x, y)
You append this location to the tag with the forward slash ( /) character.