Table of Content
HAL Forum
procedure SpecialMenu (
string ItemName,string ShortCutKey,integer PositionId,string FunctionName)
Description:
Adds a menu item into Operations menu of the window that is being defined
Parameters:
ItemName The name of the menu item
ShortCutKey A one-character keyboard shortcut that will execute the function. Lower case character: CTRL(CMD in Mac)+SHIFT+[char]/ UPPER case character: CTRL(CMD in Mac)+[char].
PositionId The position Id of the current menu item
FunctionName The name of the function that will be executed when item is selected. By standard, all the functions used here should end with "sm" suffix (meaning: sub-menu)
event DefineWindows
begin
  SetLangMode(LangEnglish,"ENG",0);

  WindowBegin("Quotations",QTLClass,CGmlist,-);
  SpawnClass(QTDClass);
  SetWRect(64,80,900,348);
  Sizeable(-1,-1,0,0);
  UseView(QTVc);
  FormName(PrintQTL);
  RecordList(4,17,-21,-39);
  RlColKey(4,2,"N_o.",SerNr,false,SerNr);
  RlColKey(81,81,"Trans. Date",QTDate,false,QTDate);
  RlColKey(153,153,"Customer",CustCode,false,CustCode);
  RlColKey(215,215,"Order No.",OrderNr,false,OrderNr);
  RlColKey(285,285,"Class",QuoteClass,false,QuoteClass);
  RlColKey(325,325, "Salesman",SalesMan,false,SalesMan);
  RlColKey(385,385,"Project",PRCode,false,PRCode);
  RlColKey(440,440, "Decision",RejectDate,false,RejectDate);
  RlColKey(512,512,"Name",Addr0,false,Name);
  RlCol(-170,-170,"Total",Sum4,true);
  if (GuiType!=kGuiCocoa) then begin
    RlColKeyTL(-100,-100,"Probability",M4Val,Probability,true,SerNr);
  end else begin
    LevelColumn(-100,-100,"Probability",Probability,8,35,60);
  end;
  SearchField("Search");
  BrowseSubsetButton(-40,-15);
  SpecialMenu("Create Order",'G',0,"ORFromQTLsm");
  SpecialMenu("Create Invoice",'F',1,"IVFromQTLsm");
  EndWindow;

  return;
end;
Related topics:
««