_mkdlog.utl Utility - Make Dialog Menu
Syntax
call "_mkdlog.utl",number_of_items,field_names$[ALL],
display_window,window_column,window_row,window_width,
window_height,maximum_field_width,title$,menu_color,
menu_record${,initialization_flag,newline_character$,option_codes$}
Description
The _mkdlog.utl utility creates a menu record and loads it with the item descriptions passed to it. This menu record uses the same template as that created by _msmktpl.utl. The default menu type is set to either vertical or two dimensional, based on window and field dimensions.
| 
                                                         Parameter  | 
                                                    
                                                         Description  | 
                                                
| 
                                                         number_of_items  | 
                                                    
                                                         Number of incoming items.  | 
                                                
| 
                                                         field_names$[all]  | 
                                                    
                                                         All incoming items.  | 
                                                
| 
                                                         display_window  | 
                                                    
                                                         PRO/5 window number to evaluate for fit.  | 
                                                
| 
                                                         window_column  | 
                                                    
                                                         Left edge of window.  | 
                                                
| 
                                                         window_row  | 
                                                    
                                                         Top row of window.  | 
                                                
| 
                                                         window_width  | 
                                                    
                                                         Number of columns.  | 
                                                
| 
                                                         window_height  | 
                                                    
                                                         Number of rows.  | 
                                                
| 
                                                         maximum_field_width  | 
                                                    
                                                         Force the field width.  | 
                                                
| 
                                                         title$  | 
                                                    
                                                         Title text.  | 
                                                
| 
                                                         menu_color  | 
                                                    
                                                         Numeric color of the menu, 1 to 64 based on Color Codes.  | 
                                                
| 
                                                         menu_record$  | 
                                                    
                                                         Outgoing menu template$.  | 
                                                
| 
                                                         initilaization_flag  | 
                                                    
                                                         Menu display, as follows:  | 
                                                
| 
                                                         
  | 
                                                    
                                                         0 Do not display the menu.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         1 Display the menu.  | 
                                                
| 
                                                         newline_character$  | 
                                                    
                                                         The character that will be used to designate the beginning of a new line in titles and menu items.  | 
                                                
| 
                                                         option_codes$  | 
                                                    
                                                         Option code to be applied when constructing the template for the menu. The current option is:  | 
                                                
| 
                                                         
  | 
                                                    
                                                         Z Makes the array defined by FIELD$ zero-based, instead of one-based, which is the default.  | 
                                                
Example
The following lists five items in the array and builds a menu structure with centered columns and rows. The field length is five characters, and the box title is "[Choose A Color ]". Everything is returned in MENU$.
LET BBEXT$=STBL("BBEXT")
DIM ITEMS$[5]
LET ITEMS$[1]="RED"
LET ITEMS$[2]="GREEN"
LET ITEMS$[3]="BLUE"
LET ITEMS$[4]="WHITE"
LET ITEMS$[5]="BLACK"
LET MAXLEN=5
LET MENU_COLOR=8
LET DISPLAY_WIN=0
LET TITLE$="[ Choose A Color ]"
CALL BBEXT$+"_mkdlog.utl",MAXLEN,ITEMS$[ALL], DISPLAY_WIN,-1,-1,0,0,5,TITLE$,MENU_COLOR,MENU$