On 29/08/2017 at 19:19, xxxxxxxx wrote:
I guess everything you need is written here
Typically in a Gedialog when you create a widget (independant from it's type, it can be a slider, a button or a customGui for exemple) you assign them an unique ID. And whhen user click it's trigger Command function with this Unique ID as id.
Since you are in a dynamics things you may want to do something like this (its pseudo code)
UI_ID = 1001
MAX_ELEMENT = 100
def CreateLayout(self) :
#ensure user will not ovveride others id
if nb_widget > MAX_ELEMENTS: return True
for i in xrange(nb_widget) :
CreateMyWidget(UI_ID + i) #you are sure every widget created get an unique id
def Command(self, id, msg=None) :
if UI_ID <= id < UI_ID + MAX_ELEMENT:
element = id - UI_ID
I also suggest you to read the C++ manual about Gedialog it can be helpful even if you develop in python.
Finally welcome here! 