Bulletin Object

Synopsis

Class Name: Bulletin
Valid Parents: Dialog, Bulletin
Valid Children: Bulletin, Button, Label, Popup, Separator, Switch, Text, Toolbar, Combobox

Description

A container for positioning other GUI objects in a dialog.

  • Child GUI objects are positioned in pixels and cannot have rubber attachment to sides of the bulletin.
  • It's possible to create a dialog with a built-in bulletin (the bulletinBoard dialog). The only restriction to a bulletinBoard dialog is that any buttons you add appear in the button area at the bottom not in the working area of the dialog.
  • When you create a bulletin as a child of a dialog, then the bulletin will fill the entire working area of the dialog and XuNguiPosition, XuNguiWidth and XuNguiHeight are ignored.
  • It is possible to have multiple bulletins within one dialog. This allows you to have a number of prepared which you switch between as required. See example below.

Inherited Resources

New Resources

  • None

Example Code

create Dialog gsharp_1.mydialog
 ( XuNguiDialogType = "template",
   XuNguiWidth = 300,
   XuNguiHeight = 200
 );
create Bulletin gsharp_1.mydialog.Bull;
create Label gsharp_1.mydialog.Bull.label
 ( XuNguiLabel = "Select Page:",
   XuNguiPosition = (0,0)
 );
create Button gsharp_1.mydialog.Bull.page1
 ( XuNguiLabel = "Home",
   XuNguiCallback = "ChangePageCB",
   XuNguiPosition = (100,0),
   XuNguiWidth = 70
 );
create Button gsharp_1.mydialog.Bull.page2
 ( XuNguiLabel = "Business",
   XuNguiCallback = "ChangePageCB",
   XuNguiPosition = (200,0),
   XuNguiWidth = 70
 );
create Separator gsharp_1.mydialog.Bull.sep1
 ( XuNguiPosition = (0,35),
   XuNguiWidth = 280
 );
create Bulletin gsharp_1.mydialog.Bull.Bull1
 ( XuNguiPosition = (0,40),  
   XuNguiWidth = 300,
   XuNguiHeight = 160
 );
create Label gsharp_1.mydialog.Bull.Bull1.Label1
 ( XuNguiPosition = (0,0),
   XuNguiLabel = "This pages is for:\nHome",
   XuNguiHeight = 50
 );
create Bulletin gsharp_1.mydialog.Bull.Bull2
 ( XuNguiPosition = (0,40),
   XuNguiWidth = 300,
   XuNguiHeight = 160
 );
create Label gsharp_1.mydialog.Bull.Bull2.Label1
 ( XuNguiPosition = (0,0),
   XuNguiLabel = "This pages is for:\nBusiness",
   XuNguiHeight = 50
 );
GuiPopupDialog("gsharp_1.mydialog");

function ChangePageCB(string o, string d, float r)
  float page1;
  page1 = ($(o).XuNguiLabel="Home");
  gsharp_1.mydialog.Bull.Bull1.XuNguiPosition = (0+not(page1)*1000,40);
  gsharp_1.mydialog.Bull.Bull2.XuNguiPosition = (0+page1*1000,40);
endfunction
  

Return to Gsharp Applications Reference Manual