Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to have a newline in a pulldown bundle. #474

Closed
martinservold opened this issue Jan 11, 2019 · 3 comments
Closed

Ability to have a newline in a pulldown bundle. #474

martinservold opened this issue Jan 11, 2019 · 3 comments
Labels
Enhancement Enhancement request [class->Improved #{number}: {title}]

Comments

@martinservold
Copy link

I'd like a way to wrap text on a pulldown bundle (hopefully would work for pulldown/ splitbutton/ splitpushbutton)

My suggestion to accomplish this would be:

Have a special group of characters (My suggestion is "___". Three underscores) that prompts a new line during extension building/reload.

This special character group could live in the folder name
EX: Folder name is: (Place Views___on Sheets.pulldown)

OR

This special character group could live in the _layout file
EX: Folder name is: (Place Views on Sheets.pulldown) but in the _layout file you call for: (Place Views ___on Sheets) and it will recognize the difference and put in a newline.

@eirannejad
Copy link
Collaborator

Interesting. Suggesting implementation using tags in _layout file:

Example:
This would be the modified layout file for Pick.splitpushbutton tool:

[title:Pick\nElements]
Pick
Pick Detail Elements
Pick Model Elements

This conforms to the already existing standard of using location tags in _layout file. e.g. pyRevitTags extension uses the tags to position its panel in pyRevit tab Packages & Tags[before:Modify]

@eirannejad eirannejad added the Enhancement Enhancement request [class->Improved #{number}: {title}] label Jan 12, 2019
@martinservold
Copy link
Author

martinservold commented Jan 12, 2019

That's probably a better way to handle it than my suggestion.

eirannejad added a commit that referenced this issue Jan 22, 2019
@eirannejad
Copy link
Collaborator

eirannejad commented Jan 22, 2019

Implemented slightly differently than suggested above.

Final implementation allows user to define the title layout directive inside layout file. For setting the title of a pulldown button for example, the layout file of the parent panel should be modified.

Example: This is the layout file of the pyRevit > Drawing Set panel setting the title for the Sheets pulldown button:

Sheets[title:Sheet\nTools]
Revision
Keynotes
views
-----
Print

pyRevit processes these directives on load time and will set the button title to the new value:

2019-01-21 16_40_06-window

Will be shipped in v4.6.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancement request [class->Improved #{number}: {title}]
Projects
None yet
Development

No branches or pull requests

2 participants