Sublime Forum

Richer formatting of Sublime.Window.show_quick_panel()

#1

If I look on various packages I see a quick panel with rich formatting (different text styles, 2 lines per item). I would like to achieve the same as in the attached picture:

Can somebody please point me to the right api? Or isn’t it Sublime.Window.show_quick_panel()?

I would also like to know if I can also specify a right justified text to an entry. Similar to the showing of keyboard shortcuts in the command palette.

0 Likes

#2

The items of a quick panel can be either a list of strings, or a list of lists. Each list entry then can have, I believe, at most three strings. The first string is that large text that you can select, the second and third are under the large text.

So for instance,

["one", "two", "three"]

would display as a boring list of three items, whereas

[["one", "has one thing"], ["two", "does a thing"], ["three", "three is prime, man"]]

would display the one, two and three again, but underneath each is a smaller text item like in your picture.

1 Like