Hi Roger,
You can use:
((TGTextLBEntry *)fComboFuncNames->GetSelectedEntry())->GetTitle() to get the text entry string, i.e.
if (!strcmp(((TGTextLBEntry
*)fCombo->GetSelectedEntry())->GetTitle(),"Gaussian")) nparm = ngp;
should work.
Cheers, Ilka
Roger Mason wrote:
>Hello,
>
>I want to set the value of a variable depending on the selected text
>entry in a ComboBox. I have:
>
>if (fComboFuncNames->GetSelectedEntry()=="Gaussian") nparm = ngp;
>
>but the value returned is an address. How do I get at the actual
>text?
>
>Sorry if this is an elementary C++ question.
>
>Thanks,
>
>Roger
>
>
>
Received on Mon Nov 14 2005 - 17:55:10 MET
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET