Lena Posted September 21, 2015 Share Posted September 21, 2015 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 More sharing options...
Sherzod Posted September 21, 2015 Share Posted September 21, 2015 Hi, UniDBLookupListBox1 -> ClientEvents -> ExtEvents ... afterrender fn: function afterrender(sender, eOpts) { sender.boundList.getSelectionModel().setSelectionMode("SINGLE"); } Best regards. Link to comment Share on other sites More sharing options...
Lena Posted September 22, 2015 Author Share Posted September 22, 2015 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); } } Link to comment Share on other sites More sharing options...
Sherzod Posted September 22, 2015 Share Posted September 22, 2015 Hi, Hmm, may be an error in the other... ?! Best regards. Link to comment Share on other sites More sharing options...
Lena Posted September 22, 2015 Author Share Posted September 22, 2015 Hi. When I remove line: sender.boundList.getSelectionModel().setSelectionMode("SINGLE"); error disappears Link to comment Share on other sites More sharing options...
Lena Posted September 22, 2015 Author Share Posted September 22, 2015 User see it: https://youtu.be/TqvKPA7B3-w Link to comment Share on other sites More sharing options...
Sherzod Posted September 22, 2015 Share Posted September 22, 2015 Ok. I will try analyze.. Best regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now