Sublime Forum

Input panel options

#1

Hi!

I am new to sublime plugin development and I am writing my first sublime 3 plugin. I want to create an input panel, but with the possibility to set checkbox options - like in for example the default sublime find panel there are options if we are using regular expressions, etc. I want to have some predefined options that the user can check or uncheck. Is this achievable in any way?

0 Likes

#2

The input panel API doesn’t support such features.

class Window(object):
    ...
    def show_input_panel(self, caption, initial_text, on_done, on_change, on_cancel):

It just allows to show a simple text input and define some callbacks which are called with the entered text as argument.

You could use the quick_panel and add the options to toggle as list items. Selecting such an item would toggle a setting, and you’d need to recreate the quick_panel immediately. A special item “submit” could be used to finally call the function you want to start with the entered text.

2 Likes

#3

Ok! Thank you for your help.

0 Likes