The Separator Object

Synopsis

Class Name: Separator
Valid Parents: Bulletin, Dialog, Menu, Popup, Toolbar
Valid Children: Popup

Description

A horizontal line.

  • In a Menu, Popup or Toolbar, a separator is used to group the options.
  • In the Toolbar, a separator is vertical.
  • In a Bulletin a Dialog, a separator can be used to make any horizontal line.
  • The default height of the separator is 1 pixel.
  • In a bulletin the horizontal line is hollow and so can be used to create a frame. Set XuNguiHeight to be the height of the frame and make sure that XuNguiSensitive is false so that objects within the frame can still receive events. See example below.

Inherited Resources

New Resources

  • None

Example Code

function CreateField(string OBJ, float y, string label)
  string PTR;
  create Text $(OBJ)
   ( XuNguiPosition = (100,y),
     XuNguiWidth = 100,
     XuNguiMultilineEdit = false
   );
  PTR = OBJ+"Label";
  create Label $(PTR)
   ( XuNguiPosition = (3,y+2),
     XuNguiLabel = label+":"
   );
  PTR = OBJ+"Button";
  create Button $PTR
   ( XuNguiPosition = (202,y),
    XuNguiLabel = "..."
   );
endfunction

  if exists(gsharp_1.mydialog) destroy gsharp_1.mydialog;
  create Dialog gsharp_1.mydialog
   ( XuNguiDialogType = "template",
     XuNguiTitle = "Resource Editor",
     XuNguiWidth = 250,
     XuNguiHeight = 165
   );
  create Bulletin gsharp_1.mydialog.Bull;
  create Label gsharp_1.mydialog.Bull.label1
   ( XuNguiPosition = (3,0),
     XuNguiLabel = "Resource"
   );
  create Label gsharp_1.mydialog.Bull.label2
   ( XuNguiPosition = (130,0),
     XuNguiLabel = "Value"
   );
  create Separator gsharp_1.mydialog.Bull.sep
   ( XuNguiPosition = (0,23),
     XuNguiWidth = 230,
     XuNguiHeight = 65,
     XuNguiSensitive = false
   );
  CreateField("gsharp_1.mydialog.Bull.height", 30, "Height");
  CreateField("gsharp_1.mydialog.Bull.width", 60, "Width");

  create Button gsharp_1.mydialog.OK;
  create Button gsharp_1.mydialog.Apply;
  create Button gsharp_1.mydialog.Cancel;

  GuiPopupDialog("gsharp_1.mydialog");

Return to Gsharp Applications Reference Manual