Jump to content

Calculating the height of the panel position


artem_niko

Recommended Posts

Hello!

I need, when clicking on the UB button, to display UniPanel2 in the upper left corner of the MainForm.
Moreover, the UB button is located on UniPanel1, i.e. UniPanel2 should be lower by the height of UniPanel1.
When I write just like that:

UniPanel2.Left:=0;
UniPanel2.Top:=0;

then UniPanel2 is displayed on the left in the value Left:=0, but it is not possible to indent down to the height of UniPanel1 from above.

Please help me correctly set the location of UniPanel2.
The screenshot shows how I need it to be:

image.png.2f5c735ffd9ebc7921029f1a60df092f.png

Link to comment
Share on other sites

40 minutes ago, artem_niko said:

I need, when clicking on the UB button, to display UniPanel2 in the upper left corner of the MainForm.
Moreover, the UB button is located on UniPanel1, i.e. UniPanel2 should be lower by the height of UniPanel1.

Sorry, I didn't quite understand your question.

Link to comment
Share on other sites

5 minutes ago, Sherzod said:

Sorry, I didn't quite understand your question.

To be honest, I don't understand what is unclear in my question ...
When you click on the button (UB in the picture), display UniPanel2 in the upper left corner, under UniPanel1.

Link to comment
Share on other sites

1 minute ago, Sherzod said:

It's not your fault, don't worry...
I just didn't understand your question.

So I kind of drew a picture...
I can't just lower UniPanel2 below, "under" UniPanel1. Now it turns out that UniPanel2 overlaps UniPanel1, as it were, being displayed in the upper left corner, using the code:

UniPanel2.Left:=0;
UniPanel2.Top:=0;

 

Link to comment
Share on other sites

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...