Highlighted

Creating a Toggle to expand and collapse items

Community Beginner ,
May 13, 2020

Copy link to clipboard

Copied

Hello Everyone,

I need to add a toggle button to my plugin with two toolTips as "Show more" and "Show less".Same scenario happen in InDesign panels widgets also(I have shown in figure, property panel in InDesign.It also has two toolTips as "Collapse to icons" and "Expand panels").I need to use a traingular shaped icon.Can you suggest a widget from InDesign SDK to do frontend development of my plugin?

 

Toggle.PNG

I appreciate your help.

Thanks in advance.

TOPICS
Feature request, SDK

Views

543

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

Creating a Toggle to expand and collapse items

Community Beginner ,
May 13, 2020

Copy link to clipboard

Copied

Hello Everyone,

I need to add a toggle button to my plugin with two toolTips as "Show more" and "Show less".Same scenario happen in InDesign panels widgets also(I have shown in figure, property panel in InDesign.It also has two toolTips as "Collapse to icons" and "Expand panels").I need to use a traingular shaped icon.Can you suggest a widget from InDesign SDK to do frontend development of my plugin?

 

Toggle.PNG

I appreciate your help.

Thanks in advance.

TOPICS
Feature request, SDK

Views

544

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
May 13, 2020 0
Advisor ,
May 13, 2020

Copy link to clipboard

Copied

As I understand it these icons are part of the Drover UI which provides the container for our widgets but otherwise live in a different world, closer to the OS. The original InDesign UI - as in the Find/Change dialog, just uses a button "Fewer Options" / "More Options".

On the other hand, as you talk about a panel widget, there is a mechanism called "panel detail" - see the Character panel for an example. It is indicated by Up-Down triangles in front of the panel's title tab, automatically added if you add an IID_IPANELDETAILCONTROLLER to your panel. There are multiple implementations for that interface, SDK samples use kSizePanelDetailControllerImpl but I also use kSetsPanelDetailControllerImpl , see Widgets.fh for the resource data format.

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...
May 13, 2020 1
Community Beginner ,
May 13, 2020

Copy link to clipboard

Copied

Hi Becker,

Thank you for the reply and I have used both TreeExpanderWidget and ToggleWidget as defined in Widgets.fh.But unable to find a way to add two toolTips as "Show more" and "Show less".You have mentioned about  Find/Change dialog but I need to use two icons for each tool tip.(one icon's arrow to the bottom and other icon's arrow to the left).Do you have any idea ?

I appreciate your help.

Thanks in advance.

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...
May 13, 2020 0
Advisor ,
May 14, 2020

Copy link to clipboard

Copied

Static tips (a single text per widget) are implemented with a TipTable resource.

You can add dynamic tips - e.g. dependent on some state, mouse location, time of day - to your widget via an own implementation of interface ITip (IID_ITIP) .

The SDK has plenty examples for both.

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...
May 14, 2020 1