Jump to content

form opens automatical although I've not called Show.


Bernie07

Recommended Posts

Hello,

If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this.

Example :

sName := Form1.Name;

This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal.

Sometimes I only want return a property without showing the form. How can I do this?

Best wishes

Bernhard

Link to comment
Share on other sites

41 minutes ago, Bernie07 said:

Hello,

If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this.

Example :

sName := Form1.Name;

This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal.

Sometimes I only want return a property without showing the form. How can I do this?

Best wishes

Bernhard

You must read the documentation for this.

unigui creates an instance of the form and if you request something from the form, the form will be displayed.

Your mistake is that: Trying to use VCL in the same way as creating forms and variables in it is not a good practice with unigui.

There are examples and documentation of this, forum search or documentation.

maybe @Sherzod will help more.

Link to comment
Share on other sites

5 hours ago, Bernie07 said:

Hello,

If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this.

Example :

sName := Form1.Name;

This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal.

Sometimes I only want return a property without showing the form. How can I do this?

Best wishes

Bernhard

Hello

If you create a form in UniGUI, the form will be displayed regardless.

If you are using UniFrame you can set parent:= to nil. With this, that frame will not be displayed.

Link to comment
Share on other sites

20 hours ago, Bernie07 said:

Hello,

If I use the Forminstance for some things, UniGui show the form. But I haven't called the Show method. How can I prevent this.

Example :

sName := Form1.Name;

This simple line shows the form. But you see, there is no Show method called like Form1.Show or Form1.ShowModal.

Sometimes I only want return a property without showing the form. How can I do this?

Best wishes

Bernhard

Hello,

See the best practice to retreive a variable from a form.

Unigui advise to use Asynchronous mode.

http://www.unigui.com/doc/online_help/index.html?synch-and-asynch-operations.htm

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...