HP SunSoft Pascal 4.0 Manuel d'utilisateur Page 255

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 333
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 254
The XView Toolkit 231
10
Menu Demo Program
Here is a more complicated program, menu_demo.p, that makes a window
and a panel with a menu button. The choices displayed are: Option 1, Option2,
and Option 3.
program MenuDemo(output);
#include "stddefs_p.h"
#include "attrgetset_p.h"
var
base_frame : Frame;
base_panel : Panel;
button : Panel_button_item;
menu : Menu;
frame_label : string;
button_label : string;
option1 : Cstringp;
option2 : Cstringp;
option3 : Cstringp;
procedure menu_proc(menu_: Menu; menu_item: Menu_item);
var
menu_string : Cstringp;
begin
menu_string := get_MENU_STRING(menu_item);
set_FRAME_RIGHT_FOOTER(base_frame, menu_string^);
end;
begin
frame_label := 'FRAME LABEL';
button_label := 'BUTTON LABEL';
new(option1); option1^ := 'OPTION 1';
new(option2); option2^ := 'OPTION 2';
new(option3); option3^ := 'OPTION 3';
xv_init(0);
Vue de la page 254
1 2 ... 250 251 252 253 254 255 256 257 258 259 260 ... 332 333

Commentaires sur ces manuels

Pas de commentaire