Sticky with text box

Hi

Can anyone advise how I can input my text in the text box and keep whatever text it is changed to as the default for the next use. I have looked at sticky but couldn’t get it to work. Please bear in mind I am new to Python so keep it simple just like me.
If you can show an example then that would be appreciated.

Create controls for the dialog

    self.m_label1 = forms.Label(Text = 'Job Number:')
    self.m_JobNum_textbox = forms.TextBox(Text = "SC-000")

Hi @RogerD,

below is one possible way to store and restore dialog values in the sticky dictionary. In case of many values of different types, you might reduce the amount of required code by creating your own dictionary of key / value pairs and store this as a single entry in the sticky dictionary.

ExampleScript.py (1.9 KB)

_
c.

Hi Clement,

Many thanks for this it’s a great help.