sparam is always empty

 

hello

i created a panel with a button

when you press the button the name of the object clicked on chart should appear on the panel

here is part of the code that should display the name of the object click

when i try it is always empty, however lparam, dparam show up normally if i replaced sparam with one of them, so i know the logic is correct

what am i doing wrong ?


void CommonChartEvent(const int id,       
                      const long& lparam,       
                      const double& dparam,     
                      const string& sparam)     
{

if (getobjectflag)
   {
  if (id==CHARTEVENT_CLICK)
  {
 
 
ExtDialog.ChangeText (sparam);
getobjectflag = false;}}


 
Ahmed_Fouda:

hello

i created a panel with a button

when you press the button the name of the object clicked on chart should appear on the panel

here is part of the code that should display the name of the object click

when i try it is always empty, however lparam, dparam show up normally if i replaced sparam with one of them, so i know the logic is correct

what am i doing wrong ?


Chart event click does not return a sparam value.  See the documentation 
 
Paul Anscombe #:
Chart event click does not return a sparam value.  See the documentation 

oh my god , really sometimes my mind is blocked and the answer is so obvious and clear .

thanks a lot !