Jump to content

Page controle height calc


fiorilli

Recommended Posts

Hello, I would like to ask a question about the page control component, I have a case here where even with all the properties set to height auto when loading images inside the page control component it "cuts" some parts. However, if I switch to another page control tab and go back to the previous one, the height calculation is redone and the image is not cut anymore. I tried to find the trigger for this size calculation, but could not. Is there any way I could make this call manually?

Link to comment
Share on other sites

1 minute ago, fiorilli said:

I would like to ask a question about the page control component, I have a case here where even with all the properties set to height auto when loading images inside the page control component it "cuts" some parts. However, if I switch to another page control tab and go back to the previous one, the height calculation is redone and the image is not cut anymore. I tried to find the trigger for this size calculation, but could not. Is there any way I could make this call manually?

Hello,

Can you please make a simple testcase to see the issue? And which build of UniGUI are you using?

Link to comment
Share on other sites

2 hours ago, Sherzod said:

Hello,

Can you please make a simple testcase to see the issue? And which build of UniGUI are you using?

Hello,

I am using build 1545. Making the test case will take a while. This screen has a lot of css tweaks and other things to be responsive. Can't you just tell me which calculation event is called when activating or deactivating a tabsheet?

Link to comment
Share on other sites

19 hours ago, Sherzod said:

Hello,

Can you please make a simple testcase to see the issue? And which build of UniGUI are you using?

Hello, I was able to do a simple testcase where it is possible to see that on the first page load the size of the tabsheet is not loaded correctly, however, when switching to tab2 and back to tab1 the size is correct. PageControlTeste.rar

 

OnFirstLoadOfPage.png

AfterChangeToTab2AndBackToTab1.png

Link to comment
Share on other sites

3 hours ago, fiorilli said:

I was able to do a simple testcase where it is possible to see that on the first page load the size of the tabsheet is not loaded correctly, however, when switching to tab2 and back to tab1 the size is correct. PageControlTeste.rar

Hello,

Can you try this approach for now?

Tab1 -> ClientEvents -> ExtEvents ->

function boxready(sender, width, height, eOpts)
{
    sender.updateLayout();
}

 

Link to comment
Share on other sites

46 minutes ago, Sherzod said:

Hello,

Can you try this approach for now?

Tab1 -> ClientEvents -> ExtEvents ->



function boxready(sender, width, height, eOpts)
{
    sender.updateLayout();
}

 

Hello, it didn't work. I am sending you a new testcase where you can see that when you click on subtab2(2) where the frames will be cleaned and click on subtab2(1) the size will be correct.

PageControlTeste.rar

Link to comment
Share on other sites

11 minutes ago, fiorilli said:

it didn't work. I am sending you a new testcase where you can see that when you click on subtab2(2) where the frames will be cleaned and click on subtab2(1) the size will be correct.

PageControlTeste.rar 1.66 MB · 0 downloads

procedure TMainForm.PnlListaAtividadeTab2Resize(Sender: TUniControl; OldWidth,
  OldHeight: Integer);
begin
  (Sender as TUniPanel).JSInterface.JSCall('updateLayout', []);
end;

 

Link to comment
Share on other sites

38 minutes ago, Sherzod said:

procedure TMainForm.PnlListaAtividadeTab2Resize(Sender: TUniControl; OldWidth,
  OldHeight: Integer);
begin
  (Sender as TUniPanel).JSInterface.JSCall('updateLayout', []);
end;

 

worked perfectly, thanks

  • Upvote 1
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...