gui_config

Sets GUI configuration options.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X        

Syntax

void gui_config(option[,data])
int             option
expr            data

Description

The option parameter values are defined in dv.h. Valid values are
gui_config_textlist Symbolic text list. data is required and is either a NULL list variable, e.g. list ll; ll=NULL;, to turn off symbolic text substitution or a two column list. The two column list has the symbolic text in the first column and its relacement text value in the second column. The list must be indexed on the first column. Symbolic texts are prefixed with "$", eg, "$LNAME". If "$LNAME" exists in the first column of the list, then it will be replaced by whatever value is in the second column, eg. "Lastname". If "$LNAME" does not exist, it is replaced by "LNAME". If the list is not set, no replacement is attempted and "$LNAME" is displayed.

Example

Switch between the original and replacement texts every time an event returns from input_r:
{                                           /* User window trigger            */
list LL;
int  i = true;

LL = list_open("10 10",0);

list_mod(LL,1,"AAAAA", "Not Found!!!");
list_mod(LL,1,"Email", "Electronic Mail");
list_mod(LL,1,"Tables","Tabular bells");
list_mod(LL,1,"Cancel","Fork");

list_index(LL,idx_cre_btree,0,0);

window(W2,open);
while (true) {                              /* loop forever                   */
  input_r;
  if (G.key == key_quit) break;

  if (i) { i = false; gui_config(gui_config_textlist,LL);   }
  else   { i = true;  gui_config(gui_config_textlist,NULL); }

  window(W2,close);
  window(w2,open);
  }                                         /* while loop forever             */
}