TGComboBox does not respond to Select(Int_t id)

I am running root v5.30 compiled on a Red hat linux platform: 2.6.30.10-105.2.23.fc11.i686.PAE #1 SMP Thu Feb 11 07:05:37 UTC 2010 i686 i686 i386 GNU/Linux.

I have a TGComboBox widget that I can not set the entry on. I call the TGComboBox::Select(Int_t) function with the numeric id of the entry I want to have as default and it does not set. The problem is reproducible using the tutorials/gui/guitest.C

Can you suggest a solution?
Chris

I should be a bit more clear. It does not appear as the default entry when the widget is finally created and I have set the current value. It does highlight when pulled down.

Hi Chris,

I don’t see the problem. If I add fCombo->Select(3); in the source of guitest.C, as:

[code] int i;
char tmp[20];
for (i = 0; i < 20; i++) {

  sprintf(tmp, "Entry %i", i+1);
  fCombo->AddEntry(tmp, i+1);

}
fCombo->Select(3);
fCombo->Resize(150, 20);
[/code]The combo box properly display “Entry 3”, and clicking on the text buttons properly change the value. Or do I misunderstand the problem?

Cheers, Bertrand.

It doesn’t do that on my machine. I suspect that may be a linux issue. I’m continuing to explore.