Jump to content

Disable multiple selections in UniDBLookupListBox


Lena

Recommended Posts

Hi.

If I use key Ctrl and mouse click I can make multiple selections in UniDBLookupListBox.

How to disable multiple selections in UniDBLookupListBox?

Thanks.

void __fastcall TUniForm1::UniFormBeforeShow(TObject *Sender)
{
 //does not work 
 UniDBLookupListBox1->DesignerMultiSelected = true;//false
}
Link to comment
Share on other sites

Hi.

Thank you.

It’s working but sometimes when I click in empty area a see this error.

//OnClick event UniDBLookupListBox
void __fastcall TUniFormSeachGrSuper::UniDBLookupListBoxSechRoomsSuperClick(TObject *Sender)

{
 try
   {


 Variant check = UniDBLookupListBoxSechRoomsSuper->KeyValue;
 if(check.IsNull() == true || UniDBLookupListBoxSechRoomsSuper->ItemIndex == -1)
  {
	
	//MainForm()->UniDBLookupComboBoxGraphicOrg->ItemIndex = - 1;
	MainForm()->UniDBLookupComboBoxGraohicRoom->KeyValue = - 1;
	MainForm()->UniDBLookupComboBoxGraphicSensor->KeyValue = - 1;
	UniDBLookupListBoxSechDatSuper->KeyValue = - 1;
	UniDBLookupListBoxSechDatSuper->ListSource = NULL;

  }
 else
	{

	 
	 MainForm()->UniDBLookupComboBoxGraohicRoom->KeyValue = -1;
	 MainForm()->UniDBLookupComboBoxGraohicRoom->KeyValue =
		UniDBLookupListBoxSechRoomsSuper->KeyValue;

     
	 UniDBLookupListBoxSechDatSuper->KeyValue = - 1;

	 
	 MainForm()->UniDBLookupComboBoxGraohicRoomCloseUp(0);
	 UniDBLookupListBoxSechDatSuper->ListSource =
		UniMainModule()->DataSourceSelectDatZaPeriod;


	}
  }
  catch (const Exception &E)
		{
		 String mis = L"Error: " + E.ClassName() + L" Message: " +  E.Message;
		 ShowMessage(mis);
		}

}

post-32-0-19589500-1442910025_thumb.jpg

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...