Jump to content

Disable multiple selections in UniDBLookupListBox


Lena
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...