Jump to content

Form Create is Showing Form


naozuka

Recommended Posts

I'm having a problem but I don't know if it's common on Unigui.

When I call Create of a form, it's showing it but I don't want to. 

It's a form that have my report component (QuickReport) and it's just a container form.

I already tried without any components and the same result. 

 

procedure TMainForm.UniButton1Click(Sender: TObject);
var form: TUniForm;
begin
  form := TUniForm.Create(UniApplication); // It's creating and showing the form here.  :( 
end;
 
 
Link to comment
Share on other sites

I'm having a problem but I don't know if it's common on Unigui.

When I call Create of a form, it's showing it but I don't want to.

It's a form that have my report component (QuickReport) and it's just a container form.

I already tried without any components and the same result.

 

procedure TMainForm.UniButton1Click(Sender: TObject);

var form: TUniForm;

begin

form := TUniForm.Create(UniApplication); // It's creating and showing the form here. :(

end;

Yes, it's common behavior to unigui.

On the online doc :

"4.Forms must be shown after they are created. A form can not be created now and shown later."

 

http://www.unigui.com/doc/online_help/creating-controls-at-runtime.htm

 

Edited :

Also, see the Reporting section :

http://www.unigui.com/doc/online_help/reporting-tools.htm

Regards

Link to comment
Share on other sites

Yes, it's common behavior to unigui.

On the online doc :

"4.Forms must be shown after they are created. A form can not be created now and shown later."

 

http://www.unigui.com/doc/online_help/creating-controls-at-runtime.htm

 

Edited :

Also, see the Reporting section :

http://www.unigui.com/doc/online_help/reporting-tools.htm

Regards

 

Thank you Abaksoft. That is what I was afraid of. 

Maybe someone can help with some CSS to hide the form?  :)

 

I did one "McGyverism" but that was not elegant.  :wacko:

 

On FormCreate: 

Self.Width := 1;

Self.Height := 1;

 

On ExtEvents: 

 

function window.afterrender(sender, eOpts)
{
  Ext.get(sender.id).el.setStyle("padding", 0);
  Ext.get(sender.id).el.setStyle("border-width", 0);
  Ext.get(sender.id).el.setStyle("-webkit-border-radius", 0);
  Ext.get(sender.id).el.setStyle("-moz-border-radius", 0);
  Ext.get(sender.id).el.setStyle("border-radius", 0);
  Ext.get(sender.id).el.setStyle("height", 0);
  Ext.get(sender.id).el.setStyle("width", 0);
}
Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...