Adding a Button to the Button Editor

Related Topics:

Adding Builtin Buttons to the Button Editor Editing an Existing Button in the Button Editor
Rearranging Buttons in the Button Editor Removing Buttons
Button Editor Window

To add a button to the Button Editor:

1. Decide whether you want to put text or an icon on the button.

2. To put text on the button, click the Text radio button, and type the text in the corresponding text box.

3. To put an icon on the button, click the Icon radio button, and type the file name of an icon. Click on the browse button to open a dialog box you can use to choose an icon file.

The icon file must be in the .xpm file format. Sun WorkShop tool bar icons are 20x20 pixels, and use only colors from the Sun WorkShop palette.


Note - You can use the CDE application dticon to create an .xpm file. Most graphics programs can also save files in .xpm format.

4. In the Dbx Command text box, type the dbx command you want executed when the button is pressed.

Note - Type commands in the Dbx Commands window to see what commands are available.

5. If you want the button to execute a dbx command that takes an argument, you must select one of the radio buttons under Append/Insert(%s) To Command On Button Press to specify the text to append the command.

6. If you want the argument embedded in the command, rather than appended to it, type %s in the command string to indicate the position of the argument.

For example, if you type the following command string in the Dbx Command text box:

stop at %%s -temp

and select the File: Line Number of Selection radio button, the button will execute the following command if it is clicked when line 25 in main.cc is selected:

stop at "main.cc":25 -temp

Note - The command string should only contain one %, and it cannot contain an escape sequence. For example:

stop at %%s -temp

produces

stop %"main.cc":25

7. Click Add and the button is added to the button list.

To add the buttons to the Custom Buttons window, click Apply.


Note - You can also add a button to the Custom Buttons window using the dbx
button Command or buttonx Command.