Skip to main content
Participating Frequently
March 4, 2020
Question

LR plugin GUI design ... hide elements dynamicly and free the alocated area (collapse)

  • March 4, 2020
  • 2 replies
  • 535 views

Hello

I have managed to disable GUI elements dynamicly if I don't need them via

enabled = LrView.bind( 'var_xyz' ),

It is also possible to hide them via the visible argument totaly. But the space the element is allocating  in the GUI is still in use.

 

I wonder if it's possible to hide GUI elements dynamicly in a way they are not visible and the area will be freed to save space. I would like to collapse parts of the GUI with unused elements.

 

Is this possible and how? I need a little push into the right direction.

 

Bye
Marcus

This topic has been closed for replies.

2 replies

johnrellis
Legend
March 5, 2020

There used to be an example posted here, but I can't find it right now -- Adobe deleted a lot of SDK posts when they transitioned to a new forum platform. This is the closest I can find:

https://community.adobe.com/t5/lightroom-classic/lr-plugin-gui-design-hide-elements-dynamicly-and-free-the-alocated-area-collapse/td-p/10963760?page=1

 

[Use the reply button under the first post to ensure replies sort properly.]

johnrellis
Legend
March 4, 2020

Unfortunately, the SDK doesn't let a plugin dynamically add or remove controls while presentModalDialog() or presentFloatingDialog() is executing.  So generally, for minor situations, I just design around it by using a fixed number of controls or by using visibility.  (One trick is to have overlapping controls, hiding one set while showing the other.)

 

In a few cases in my plugins, where it's very useful to add or remove controls, the plugin uses LrDialogs.stopModalWithResult() to exit the current execution of the dialog, rebuilds the controls, and reruns presentModalDialog().

 

[Use the reply button under the first post to ensure replies sort properly.]

Participating Frequently
March 5, 2020

Hello John

 

Thank you for the quick answer. I'm not really a programmer and always need some examples to start. The docs from Adobe are not very verbose and the most plugins I could learn from are encrypted.

So could you please give me a short example?

 

Bye
Marcus