Customising the Tool Palette in the UDE

Tony Marston - 8th July 2002

When working in the UNIFACE Development Environment (UDE) the Graphical Form Painter (GFP) contains a Tool Palette which, by default, looks like the image in figure 1:

Figure 1 - the Tool Palette with default settings

tip35_01.gif

This allows the developer to drag particular types of widget from the tool palette and drop them into the component which is under construction. Additional widgets are available by pressing on the widget menu button which is on the bottom left, as shown in figure 2:

Figure 2 - the additional widget menu

tip35_02.gif

You may find that you are continually having to go to the additional widget menu in order to select the widget that you want, so wouldn't it be nice if you could move these widgets from the additional menu onto the main tool palette? Well, believe it or not, you can. All you have to do is make a small modification to your USYS.INI file.

If you look in your current INI file you will see the portion which deals with the tool palette. It looks like the following:

[gfp]
; Logical widgets to appear on the main floating palette
widgets=

By default the widgets= line is empty, but if you add a widget name to this line an icon for this widget will appear in the tool palette. For example, if you change this entry to the following:

[gfp]
; Logical widgets to appear on the main floating palette
widgets=checkbox,radiogroup,commandbutton,dropdownlist

this will make the tool palette appear as shown in figure 3:

Figure 3 - the customised tool palette

tip35_03.gif

Note that you can only use widget names that have been defined in the [widgets] section of your INI file.

When you include widgets in the tool palette in this way they disappear from the additional widget menu - they are effectively moved from one to the other.

Finally, a word of caution. Please do not be tempted to move ALL available widgets onto the tool palette because it will, in my humble opinion, become huge and unmanageable. Apart from which where you have different widgets which share the same icon, such as EditBox, NoEditBox and MessageBox, it becomes tricky to pick the right one.

I personally use little more than I have shown here as when I want to add a field which has been defined in the application model I need use no more than the tip35_04.gif icon. When I rename the field all its properties, including the widget type, are set to what has been defined in the model for that field.


Tony Marston
8th July 2002

mailto:tony@tonymarston.net
mailto:TonyMarston@hotmail.com
http://www.tonymarston.net

counter