Table of Content
HAL Forum
procedure Pict_Field (
integer StartX,integer StartY,integer EndX,integer EndY,string Reserved)
Description:
Creates a picture object to the window that is being defined. The picture that will be used on that field is the first picture attached to that record. Used inside WindowBegin/EndWindow block.
Parameters:
StartX The X coordinate of the upper left corner of the picture field rectangle.
StartY The Y coordinate of the upper left corner of the picture field rectangle.
EndX The X coordinate of the lower right corner of the picture field rectangle.
EndY The Y coordinate of the lower right corner of the picture field rectangle.
Reserved For internal use. Should be set to "".
event DefineWindows
begin
  Real h,h1,h2,h3,h4,h5,h6,h7,hs,hm,v,v3,l,vs,vm,f,t,x,v2;
 // string 60 label;

  SetLangMode(LangEnglish,"ENG",0);

  WindowBegin("Item",INDClass,CGview,INView);
  SetWRect(64,80,749,291);
  UseView(INVc);
  v = 6; vs = 20; h = 120; h2 = 350; h3 = 280; h4 = 410;
  Pict_Field(h2 + 130,v,-42,-40,"");
  if (GuiType==kGuiCocoa) then begin
    PushButton(-170,180,-80,286,ToolImagePicker,"Add picture");
  end;
  EditField(h,v, 150,"No.",Normal,Code,false,0);
  EditField(h2,v,-230,"Group",Normal,Group,false,ITSClass);
  EditField(h,v+=vs,-230,"Name",Normal,Name,false,0);
  EditField(h,v+=vs,100,"Price",Normal,UPrice1,false,0);
  EditField(h,vm=(v+=vs),100,"Unit",Normal,Unittext,false,UnitSClass);
  if ValuePack(2) then begin
  EditField(h,v+=vs,100,"Markup %",Normal,Markup,true,0);
  ButtonFrame(h3,v=vm,120,2,"Item Type");
  RadioButton(h3,v,0,0,"Plain",ItemType);
  RadioButton(h3,v+=16,3,0,"Service",ItemType);
  CheckBox(h3,v+=25,0,"Treat Item as Material on Project",ItemMaterial);
  end;
  if ValuePack(4) then begin
  EditField(h,v+=vs,100,"Item Formula",Normal,CalcPrice,false,CPMSClass);
  end;
  EditField(h,vm=(v+=vs),55,"Dom. Sales A/C",Normal,SalesAcc,false,AccSClass);
  EditField(h,v+=vs,55,"EU Sales A/C",Normal,EUSalesAcc,false,AccSClass);
  EditField(h,v+=vs,55,"Export Sales A/C",Normal,ExpSalesAcc,false,AccSClass);
  EditField(h3,v=vm,20,"Dom. VAT Code",Normal,VATCode,false,VATCodeSClass);
  EditField(h3,v+=vs,20,"EU VAT Code",Normal,VATCodeEU,false,VATCodeSClass);
  EditField(h3,v+=vs,20,"Export VAT Code",Normal,VATCodeExp,false,VATCodeSClass);
  EditField(h4,v=vm,50,"Dom. Tax Temp.",Normal,TaxTemplateCode,false,TaxTemplateSClass);
  EditField(h4,v+=vs,50,"EU Tax Temp.",Normal,TaxTemplateCodeEU,false,TaxTemplateSClass);
  EditField(h4,v+=vs,50,"Exp. Tax Temp.",Normal,TaxTemplateCodeExp,false,TaxTemplateSClass);
  if ValuePack(9) then begin
  EditField(h,v+=vs,-240,"Classification",Normal,DispGroups,false,DISClass);
  end;
  CheckBox(h,v+=25,0,"Closed",Terminated);
  EndWindow;

  return;
end;
Related topics:
««