Topic: Enabling / disabling objects depending on the use
Hi there,
I am calling on the developer champions here as I am still a newbie in Delphi.
I am looking for a way to enable or disable different objects in a form according to the use I need.
My project being quite complex, I will narrow my issue to the simplest:
Form1
Button1 = add specific record using Form2
Button2 = add specific record using Form2
Button_ADD = add new record using Form2
Button_Edit = show Form2
Form2
Textbox1 , Button_save1
Combobox1, Button_save2
Grid1, Button_edit
Now the constraints:
When click on Form1.Button1 = show Form2 to add a new record with only Form2.Texbox and Form2.Button_save1 enabled
When click on Form1.Button2 = show Form2 to add a new record with only Form2.Combobox and Form2.Button_save2 enabled
When click on Form1.Button_ADD = show Form2 to add a new record with all object enabled except Form2.Grid1 and Button_edit
When click on Form1.Button_Edit = shown Form2 and activate all objects in Form2
We have tried with Dmitry to use Tag in scripts but it does not work the way I want, it always ends up in a messy state where latest tag is stuck in memory somehow.