Smart Field Controls
Syntax
[%P=Function[;I=Bitmap]%.Width Varname]
Note: You must not have any space characters in the finished command.
Argument |
Type |
Description |
| Function | C |
Any valid Xbasic function with appropriate arguments. |
| Bitmap | C |
Optional. The name of a bitmap to put at the right edge of the control. |
| Width | N |
The width of the control. |
| Varname | A |
The variable that receives the return value from the function. |
Description
Alpha Five allows you to define your own smart fields, which look at drop-down edit combo boxes.
Type |
Example |
[%P=ui_select_color(Color_Variable)] [%P=ui_select_color2(Color_Variable)] | |
[%P=popup.calendar(dtoc(Date_Variable));I=popup.calendar%.30Date_Variable] | |
[%P=ui_get_fieldname(Table_Name))%.30Field_Variable] | |
[%fFile_Type_Filter%.50Filename_Variable] | |
[%P=ui_get_filter(Title, Prompt, Default_Filter, Table)%.50Filter_Variable] | |
[%P=ui_get_font(Title, Font_Variable)%.30Font_Variable] | |
Number |
[%P=popup.calculator(Number_Variable);I=popup.calculator%.30Number_Variable] [%sLow_Value,High_Value%.30Number_Variable] |
[%P=ui_get_order(Title, Prompt, Default_Order, Table)%.50Order_Variable] | |
[%p=ui_get_path(Title, Default_Drive, Default_Path);I=$a5_folder%.50Path_Variable] |
Example
The following examples show how to create font picker and color picker smart controls.
Font |[%P=ui_get_font()%.30font]; Color: |[%P=ui_select_color(dat.row[row].color)]; ' drop down list of names Color: |[%P=ui_select_color2(dat.row[row].color)]; ' palette display |
If you are using array variables with square bracket notation, you must escape the trailing "]" bracket with a backslash "\" when the variable is referenced by a control. However, it must not be modified when used inside a function call. For example:
Font: |[%P=ui_get_font("",dat.font[textindex].font)%.30dat.font[textindex\].font!fontevent_*]; I=$a5_palette%.24dat.row[row\].color!colorevent_*]; |
See Also
Xdialog Language Directives and Operators, Xdialog Control Reference, Smart Fields in Xdialogs
Supported By
Alpha Five Version 6 and Above