Klik op het logo voor hulp op afstand
  
 
 
 
 
 
 
 




Talking to the user : Form objects


The FORMSETTINGS class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Properties
COLOUR
 
FONT
 
SCREEN
 
 
To be documented
 
The FORM class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Methods
ADJUSTSIZE
 
DISPLAY
 
Properties
CAPTION
 
CLIENTHEIGHT
 
CLIENTWIDTH
 
ISDIALOG
 
WIDTH
 
WINHANDLE
 
X
 
Y
 
 
To be documented
 
 
The BUTTON class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Properties
CANCEL
 
CAPTION
 
DEFAULT
 
HEIGHT
 
WIDTH
 
X
 
Y
 
 
To be documented

 

The CHECKBOX class

Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Properties
CAPTION
 
CHECKED
 
HEIGHT
 
WIDTH
 
X
 
Y
 
 
To be documented
 
The DIALOG class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Methods
ADJUSTSIZE
 
DISPLAY
 
Properties
CAPTION
 
CLIENTHEIGHT
 
CLIENTWIDTH
 
ISDIALOG
 
RESULT
 
WIDTH
 
WINHANDLE
 
X
 
Y
 
 
To be documented
 
The EDITBOX class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Properties
HEIGHT
 
HIGH
 
KIND
 
LOW
 
MAXLEN
 
VALUE
 
WIDTH
 
X
 
Y
 
 
To be documented
 
 
The LABEL class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Properties
CAPTION
 
HEIGHT
 
WIDTH
 
X
 
Y
 
 

To be documented

The LISTBOX class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Methods
ADD
 
ASSIGN
 
CLEAR
 
DELETE
 
EXCHANGE
 
INDEXOF
 
INSERT
 
Properties
ALIGN
 
COUNT
 
HEIGHT
 
ITEMINDEX
 
ITEMS
 
WIDTH
 
X
 
Y
 
 
To be documented
 
 
The SELECTIONBOX class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Methods
ADD
 
CLEAR
 
DELETE
 
EXCHANGE
 
INDEXOF
 
INSERT
 
Properties
 
 
 
To be documented
 
 
The TEXTBOX class
 
Constructor
CREATE ( ? )
 
Destructor
FREE ()
 
Properties
ALIGN
 
HEIGHT
 
TEXT
 
WIDTH
 
WORDWRAP
 
X
 
Y
 
 
To be documented

Form example

Het voorbeeld laat de gebruiker toe een groep te kiezen uit het huidige project en maakt voor deze groep de aanzichttekening als bitmap bestand.

CurPro := GetCurrentProject();
IF CurPro = Nil THEN halt; /* no project loaded */
fn0 := InterpreteString('%PATH_OUTPUT%')+'\';
fn1 := ChangeFileExt(ExtractFilename(CurPro.Filename),'');

/* build list with assembly codes */

glst := Strings.Create();
i := 0;

WHILE i < CurPro.ProjectData.ChildCount DO
{
     grp := CurPro.ProjectData.Children[i];
     s := grp.Code;
     IF grp.Desc <> '' THEN s := s + ' : ' + grp.Desc; 
     glst.Add(s);
     i := i + 1;
};
/* create assembly selection dialog */
 
frm :=FORM.Create('Select assembly (project '+fn1+')');
lst  :=LISTBOX.Create(frm,4,4,frm.ClientWidth - 8,frm.ClientHeight - 12 - 34 - 28 - 28,glst);
btn :=BUTTON.Create(frm,BUTTON_OK,'Create bitmap!',4,4+lst.Height+4,frm.ClientWidth - 8,30);
chkBemaat :=CHECKBOX.Create(frm,'Add measures' ,4,4+lst.Height+4+btn.Height,frm.ClientWidth - 8,24,False);
chkKleur :=CHECKBOX.Create(frm,'Colour',4,4+lst.Height+4+btn.Height+4+chkBemaat.Height,frm.ClientWidth - 8,24,True);
lst.ItemIndex := 0;

/* let user pick an assembly */

@kiesgroep:

IF frm.Display() = BUTTON_OK THEN
{

    ndx := lst.ItemIndex;
    IF ndx >= 0 THEN
{

    fn := fn0 + fn1 + '_' + CurPro.ProjectData.Children[ndx].Code + '.bmp';
    IF CreateBitmapfile (CurPro.ProjectData.Children[ndx], fn, 100, 100, chkBemaat.Checked,chkKleur.Checked, 1.0, 1,0, 120) THEN MsgBox('<'+fn+'> created !')
ELSE
    MsgErr('Failed creating bitmap !');
}
ELSE
    MsgErr('Invalid selection !');
    GOTO kiesgroep; /* pick next assembly */
};

chkKleur.Free();
chkBemaat.Free();
btn.Free();
lst.Free();
frm.Free();
glst.Free();

 

<< Terug




 |  History  |
 
 

 
 
 
TECHWIN SOFTWARE
De Regenboog 11
B-2800 Mechelen
T +32(0)15 44 64 64
T +31(0)30 899 32 15 Nederland