08-27-2020, 09:52 AM
(This post was last modified: 08-27-2020, 10:12 AM by Rick Johnson.
Edit Reason: add info on button widget
)
I'm trying to set a double-click callback for a Label widget, but it doesn't get called. Mine contains an image, but the behavior can be easily reproduced in the panel sample project. Add these lines to the document name label definition:
Now add these two callbacks containing any do-nothing code:
Add breakpoints to each callback, run and test by clicking and double-clicking the label. Double-click never gets called, but instead calls the click callback twice. I tried this on a Button widget with the same results.
Is there something else that needs to be set to recognize a double click?
Thanks for any advice.
Code:
this->__docPanelNameLabel.setDoubleClickCallback(HDI_CORE_CALLBACK(panel::Plugin, this, __doubleclickTestCB));
this->__docPanelNameLabel.setClickCallback(HDI_CORE_CALLBACK(panel::Plugin, this, __clickTestCB));
Now add these two callbacks containing any do-nothing code:
Code:
void panel::Plugin::__doubleclickTestCB(){
int i = 0;
}
void panel::Plugin::__clickTestCB(){
int i = 0;
}
Add breakpoints to each callback, run and test by clicking and double-clicking the label. Double-click never gets called, but instead calls the click callback twice. I tried this on a Button widget with the same results.
Is there something else that needs to be set to recognize a double click?
Thanks for any advice.