Mossy Posted June 11, 2022 Share Posted June 11, 2022 Hi UniComboBox.Items.clear; Clears Items and the text in the box. How can the items be cleared but leave the text in the box. Also after clear typing any character that was in the items list they appear on dropdown. How can the items be cleared and not shown again? Thank you. Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 11, 2022 Share Posted June 11, 2022 Hello, 17 minutes ago, Mossy said: UniComboBox.Items.clear; Clears Items and the text in the box. How can the items be cleared but leave the text in the box. Also after clear typing any character that was in the items list they appear on dropdown. How can the items be cleared and not shown again? Which build of UniGUI are you using? How can we reproduce this issue? Could you make a simple testcase to check? Quote Link to comment Share on other sites More sharing options...
Mossy Posted June 11, 2022 Author Share Posted June 11, 2022 Hi I am using version 1.90.0.1560 Quote Link to comment Share on other sites More sharing options...
Mossy Posted June 13, 2022 Author Share Posted June 13, 2022 Hi Please find attached a test example. After selection clear item clears the items and the text selected. Regards Test.7z Quote Link to comment Share on other sites More sharing options...
Mossy Posted June 13, 2022 Author Share Posted June 13, 2022 Hi The problem is uniComboBox.Items.add will add the items correctly, however uniComboBox.Items.clear will not only clears the items but also clears the text. If the text is typed it will stay on however if the item is selected it will also be cleared. Any way of avoiding tis? Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2022 Share Posted June 13, 2022 26 minutes ago, Mossy said: The problem is uniComboBox.Items.add will add the items correctly, however uniComboBox.Items.clear will not only clears the items but also clears the text. If the text is typed it will stay on however if the item is selected it will also be cleared. Hello, I'm sorry, I don't quite understand something, I'll try to understand and analyze it. By the way, did you check how the VCL ComboBox behaves? Quote Link to comment Share on other sites More sharing options...
Mossy Posted June 13, 2022 Author Share Posted June 13, 2022 Hi Sherzod Thank you for your email, The VCL is working correctly. Clear Items will not clear the selected text. Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2022 Share Posted June 13, 2022 14 minutes ago, Mossy said: Clear Items will not clear the selected text. Well, on the one hand, why such behavior, is it not correct to remove, including the selected text? Quote Link to comment Share on other sites More sharing options...
Mossy Posted June 13, 2022 Author Share Posted June 13, 2022 Hi When one is typing drop down offer choices depending on what is typed, however one type more or changes the content and the content of drop down need to cleared and filled with the new choices, however the actual text in the box should not be effected. When adding items, is only adding to the items list not the actual text box, why clearing should not effect just the items. If this is not the case then adding should add to the text box as well. Is that acceptable? regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2022 Share Posted June 13, 2022 2 hours ago, Mossy said: When one is typing drop down offer choices depending on what is typed, however one type more or changes the content and the content of drop down need to cleared and filled with the new choices, however the actual text in the box should not be effected. When adding items, is only adding to the items list not the actual text box, why clearing should not effect just the items. If this is not the case then adding should add to the text box as well. Is that acceptable? You can open a ticket in the support portal. Workaround: var OldText: string; begin OldText := UniComboBox1.Text; UniComboBox1.Clear; UniComboBox1.Text := OldText; ... Quote Link to comment Share on other sites More sharing options...
Mossy Posted June 14, 2022 Author Share Posted June 14, 2022 Hi Another issue with the TUniCOmboBox is when deleting characters with back space key, if the key is not held down continuously, characters deleted and redisplayed again and the cursor is jumping back and forward. Is not a nice smooth process for some reason. Is there a solution for this? Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.