Highlighted

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

Mar 04, 2020

Copy link to clipboard

Copied

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

Topics

How to, SDK

Views

123

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

Mar 04, 2020

Copy link to clipboard

Copied

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

Topics

How to, SDK

Views

124

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Mar 04, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 05, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Mar 05, 2020

Copy link to clipboard

Copied

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

 

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...