I think, it will be good idea to add WhenSelected-callback to DropList.
My variant:
DropChoise.h
class DropList ...
...
Callback WhenSelected;
...
DropList.cpp
void DropList::Select() {
int c = list.GetCursor();
if(c >= 0)
value = key[c];
if(dropfocus)
SetFocus();
Sync();
UpdateAction();
WhenSelected.Execute();
}
Best regards,
Anton
UpdateAction above calls generic WhenAction (like for almost any other widget when user changes the value of widget). (It also sets modify flag for widget).