Jump to content

Recommended Posts

Posted

Hi,

 

i made it this way.... for all of my forms:

 

Hint for my german-words:

fensterliste = list of TUniForm-names

fensteranzahl: count of open TUniForms

 

 

TMainForm

..

    public
    { Public declarations }
    fensterliste: Array[1..100] of String;    
    fensteranzahl:Integer;
 
 

 

1.)

procedure TMainForm.UniFormScreenResize(Sender: TObject; AWidth,
  AHeight: Integer);
begin
uniTimer3.Enabled:=true; //sende_resizing;
 
 
2.)
procedure TMainForm.UniTimer3Timer(Sender: TObject);
begin
sende_resizing;
 

 

 

3.)
procedure TMainForm.sende_resizing;
var fensterschleife:Integer;
begin




    for fensterschleife := 1 to fensteranzahl do
    begin


    if fensterliste[fensterschleife]='VF_ARBEITSLISTE' then VF_ARBEITSLISTE.resizing;
    if fensterliste[fensterschleife]='VF_VERTRAG' then VF_VERTRAG.resizing;
    if fensterliste[fensterschleife]='VF_MANDANT' then VF_MANDANT.resizing;
    if fensterliste[fensterschleife]='VF_PERSON' then VF_PERSON.resizing;

and so on ...
...
 
 
 
And in EVERY TUNIFORM:
 
  public
    { Public declarations }
    procedure resizing;
 
1.)
procedure TF_VORSCHUSS.UniFormCreate(Sender: TObject);
begin
mainform.fensteranzahl:=mainform.fensteranzahl+1;
mainform.fensterliste[mainform.fensteranzahl]:=self.Name;
 
2.)
ON Close 


// Fenster aus dem Fenster-Array löschen
    y:=1;
    for x:=1 to mainform.fensteranzahl do
    begin
      if mainform.fensterliste[x]=self.Name then y:=y+1;
      mainform.fensterliste[x] := mainform.fensterliste[y];
      y:=y+1;
    end;
    mainform.fensteranzahl:=mainform.fensteranzahl-1;


close;

3.)

procedure resizing;
var x,y,h:Integer;
begin
{
// BIG - CENTER
self.Width:=trunc((mainform.Width-60));
self.Height:=trunc((mainform.Height-60));
self.Left:=30;
self.Top:=30;
}
{
// USE JUST HEIGHT - CENTER
self.Width:=850;
self.Height:=trunc((mainform.Height-100));
self.Left:=trunc((mainform.Width/2)-(self.Width/2));
self.Top:=trunc((mainform.Height/2)-(self.Height/2));
//V_STRUKTUR_VERTRAG.verstecke_maske;
}
// NO CHNAGE OF SIZE - JUST CENTER FORM
self.Left:=trunc((mainform.Width/2)-(self.Width/2));
self.Top:=trunc(((mainform.Height)-(self.Height))/3);


end;

 

 

 

Posted

Hi Ulugbek.

 

Try...

 

1. UniLoginForm1.Script ...

window.onresize = function(){
  if (typeof UniLoginForm1 !== 'undefined') {  
    var getSize = Ext.getBody().getViewSize(),
        winWidth = getSize.width,
        winHeight = getSize.height,
        left = (winWidth - UniLoginForm1.window.width) / 2,
        top = (winHeight - UniLoginForm1.window.height) / 2;

    UniLoginForm1.window.setPosition(left, top);
  }
}

2. UniLoginForm1.AlignmentControl -> uniAlignmentClient

 

 

Best regards.

  • Happy 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...