mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #289] Padding dropdown text? #223
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mikeschinkel on GitHub (Jun 3, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/289
Is there a simple way to pad the dropdown text so that the dropdowns are wider than the widest element? Dropdowns feel a bit cramped when their text is has no padding in the drop down.
I have found that I can add the spaces to either side of the literal dropdown text and then after the users has entered values into a form trim them but it feel really hacky to do that.
Also, it would be nice if the highlight could always stretch the full width of the drop down no matter what the length of the option text currently is.
I looked at creating a pull request for this but I can see that it might be implemented more than one way so don't want to do it the way you would not prefer, but will be happy to with guidance.
@rivo commented on GitHub (Jul 5, 2019):
My latest commit adds
SetTextOptions()to theDropDownprimitive. This should allow you to add some padding to the drop-down items. I also decided to stretch the selection bar to the entire width as you requested.@mikeschinkel commented on GitHub (Jul 5, 2019):
@rivo Thank you!