TComboBox Question lazarus / 31-LCL ---------------------------------------------------------------------- xinyiman · 2010-08-03 09:14 How do I select code from the last value of my TComboBox? Excuse the stupid question! ---------------------------------------------------------------------- BlueIcaro · 2010-08-03 09:50 Did you tried: Quote Value :=  MyComboBox.Items[MyComboBox.Count-1].Text; /BlueIcaro ---------------------------------------------------------------------- xinyiman · 2010-08-03 10:25 resolved with Cmb_Turni.ItemIndex:=NumMax-1; //because index start to 0 ---------------------------------------------------------------------- eny · 2010-08-03 16:16 Quote from: xinyiman on August 03, 2010, 12:25:47 pmresolved with Cmb_Turni.ItemIndex:=NumMax-1; //because index start to 0 Not resolved and a dorment bug! BlueIcaro gave the right hint: if Cmb_turni.Count > 0 then   Cmb_turni.ItemIndex := Cmb_turni.Count-1; ---------------------------------------------------------------------- xinyiman · 2010-08-04 11:35 Quote from: eny on August 03, 2010, 06:16:16 pmQuote from: xinyiman on August 03, 2010, 12:25:47 pmresolved with Cmb_Turni.ItemIndex:=NumMax-1; //because index start to 0 Not resolved and a dorment bug! BlueIcaro gave the right hint: if Cmb_turni.Count > 0 then   Cmb_turni.ItemIndex := Cmb_turni.Count-1; Thank you