TButton action trigger #200
Replies: 1 comment
-
|
Hola, Jordi! Bon any nou!
tvision/source/tvision/tdialog.cpp Lines 77 to 91 in 423aeb5 That's the reason why you are observing a different behaviour for these commands. In order to do the same for other commands, you need to create your custom class inheriting from void TMyDialog::handleEvent(TEvent& event)
{
TDialog::handleEvent(event);
if (event.what == evCommand)
{
switch (event.message.command)
{
case cmNew:
// case ...:
if ((state & sfModal) != 0)
{
endModal(event.message.command);
clearEvent(event);
}
break;
}
}
}Or you can omit the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When i have a TButton with id different than cmOK, cmCancel
dlg->insert(new TButton(TRect(2,2,14,4), "
Add Mesh", cmNew, bfNormal));`How do i do to trigger the button pressed?, when cmNew is not returning from the tdesktop->execView(dlg)
Beta Was this translation helpful? Give feedback.
All reactions