Tk's Dialog under X Window System

Gstripes can be used for the typical »tk_getOpenFile«, »tk_getSaveFile« and »tk_messageBox« based dialogs.

These dialogs are hijacked by Gstripes through an event handler, which is registered on the basic dialog classes: »TkFDialog« and »Dialog«.

Figure 6.56. tk_GetOpenFile with Gstripes

No extra code is required to activate striped varieties for these Tk dialogs. Only the packages, containing the striped implementation, have to be loaded once.

Gstripes will change the layout of both dialog types. Buttons are arranged on the fallen diagonal, to better accommodate western-language environments.

The button layout can be changed for the striped tk_messageBox. There is a new Option Database property »layout« for class »Dialog«. These property contains triple entries for each button stating the »ID« inside the w array, the »column« and the on-default state for the button’s default frame.

The columns 0,2,4,6,8,10 feature 6 pixels, to distribute the buttons equidistantly. Column 4 has a additional weight attribute.

There is no custom »layout« for the file dialogs.

The striped dialogs are compatible with Tile.

tk_messageBox should allow to replace the caption for each dialog button. This could be done for the striped variant! But must also happen for AQUA® and Microsoft-Windows®, which are unaffected by Gstripes! That is why I left it as-it-is, sorry.