[javascript FR] custom dialog ability to set height of cluster or view

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
Mathew
User
Posts: 926
Joined: Thu Jun 19, 2014 7:30 pm

[javascript FR] custom dialog ability to set height of cluster or view

Post by Mathew »

I'd consider this FR "would be nice" but low priority.

When the height of custom dialogs created with app.execDialog() gets too much for the screen, PXCE automatically creates scrollbars for the entire dialog. This request is for a way to do that for 'cluster' or 'view' elements (similar to multiline static_text) so that the OK/Cancel buttons and anything else important is not pushed off the bottom. Currently, a height given to these elements is ignored.

example of a long dialog:

Code: Select all

{
  const elements = [];
  const text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
  for (let i = 20; i--;) elements.push({type: 'static_text', name: i + ": " + text, width: 400});
  
  const dia = {
    description: {name: "Long dialog", elements:[
      {type: 'view', height: 600, align_children: 'align_left', elements },
      {type: 'ok'}
    ]}
  }
  app.execDialog(dia)
}
image.png
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 13211
Joined: Wed Jan 03, 2018 6:52 pm

Re: [javascript FR] custom dialog ability to set height of cluster or view

Post by Daniel - PDF-XChange »

Hello, Mathew

Thank you for the post! I have raised the request with the Dev team for consideration.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]