Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl: how activated a callbak by an embedded Option
ArrayCtrl: how activated a callbak by an embedded Option [message #60646] Wed, 19 June 2024 16:28 Go to previous message
forlano is currently offline  forlano
Messages: 1207
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I have un ArrayCtrl and some of its cell contains an Option created with

arr.CreateCtrl<Option>(0, 2, false);

Each time an Option is clicked I need a callback that recognise the row and column where the Option was. The callback is like this:

void MyApp::SetTB()
{  int row = arr.GetClickRow(); 
   if (row<0) return;
   int col = arr.GetClickColumn();
   Exclamation( AsString(row) + " " + AsString(col));
}


Unfortunately, I am not able to achieve this simple task. I tried with no success

arr.WhenSel = THISBACK(SetTB);
arr.WhenCtrlsAction = THISBACK(SetTB);
arr.WhenLeftClick = THISBACK(SetTB);
...

but the associated callback do nothing when I click the Option. It seems the Option shadow the arrayctrl and prevent it to pass the clicked cell. Even the cursor of the arrayCtrl does not move when I click on the Option of fifferent rows.
Instead the callback works when I click a cell whitout the Option.
Perhaps this is a feature. Is there a way to add an Option inside the ArrayCtrl and then pick its coordinate inside the arrayctrl when it is clicked?

Thanks,
Luigi
 
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl: how to identify embeded Option
Next Topic: Immediate Search correction
Goto Forum:
  


Current Time: Wed Jun 18 07:50:45 CEST 2025

Total time taken to generate the page: 0.05911 seconds