Retrieving primary key id from a Combo Box?

In StarBasic / LibreBasic, how do I retrieve the key id of the selected item in a combo box?

  Doc = ThisComponent
  TheForm = Doc.DrawPage.Forms.GetByName("Form")
 
  CbBoxFeature = TheForm.getByName("CbBoxFeature")
  CbBoxDESPName = TheForm.getByName("CbBoxDESPName")
  cbUpdateToState = TheForm.getByName("cbUpdateToState")
	
  featureName = CbBoxFeature.text
  despName =  CbBoxDESPName.text
  setToState = cbUpdateToState.text ' How do I retrieve the id instead of the name?

Or is it just a matter of having to use a query to find out what the id is, like it used to be in OpenOffice.org?

Why do you use a Combo box? Perhaps you want use ListBox?