The Form or Table windows can include link buttons. These link buttons are used to display a table, a form or a table + form on linked files for example.
A simple example: viewing the orders of a customer from the form of the customer.
A link button must necessary be named:
- BTN_TableLink_RADFileX for a link to a table window
- BTN_FormLink_RADFileX for a link to a form window
- BTN_RelationLink_RADFileX for a link to a relation window.
Note: BTN_ is the prefix defined in the programming charter: it is not required if no programming charter is used.
Any caption can be used. However, we recommend that you use a simple caption ("RADFileB table" or "RADFileA form" for example).
Code: Example of code that can be used in a link button, allowing you to open a table on the RADFileB file from the form on RADFileA:
// Implement the filter on the link key
// Open the table window of RADFileB
// Disable the filter
Position of the link buttons and additional link buttons
The link buttons can be positioned anywhere in the window. When generating the window, the link buttons will be created at the specified location. Depending on the size of the analysis used by RAD, more than 3 link buttons can be found in a window. Therefore, we recommend that you plan for additional link buttons.
These addition buttons are used to position the link buttons. Indeed, the link buttons can be aligned horizontally, vertically or even in circle.
The additional link buttons must have a specific name: BTN_LINK_n (BTN_ is the prefix defined in the programming charter: it is not required if no programming charter is used), where n is the number of the button (BTN_LINK_1 for example). These buttons must contain no code and they must be associated with no preset action.
Note: When performing the RAD generation, if the number of link buttons is greater than the number specified in the pattern, the additional generated buttons will be overlaid over the position of the last link button positioned in the pattern.