Didier Posted August 18, 2023 Share Posted August 18, 2023 Hello, I've a unidbgrid with a lot of columns. When i want to filter on one witch have checkbox, i can't check 2-3 or more at the same time. I check one -> the combo close and my grid is updating. i must re open filter to check on other and other ... Can i put a button "validate" on my filter combo ? or check everything i want and when i click somewhere, the combo close and apply filter ? Thank you Didier Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 18, 2023 Share Posted August 18, 2023 3 hours ago, Didier said: When i want to filter on one witch have checkbox, i can't check 2-3 or more at the same time. Hello Didier, It seems I couldn't reproduce. Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 ok, my code is very old... i put unicombobox in filtereditor. I think unicheckcombobox didn't exist when this was made. and by code i changed my unicombobox into unicheckcombobox.. so now i ll try to use. it is ok But just one things now. how can i change the width of my combobox. the title is small : 'Dpt' but list of the check combo is like this : '64 - Pyrénée' (or higer) .. i want to see all the line without return i ve this code but it not works (it was for the unicombox): aUniCombobox.ClientEvents.UniEvents.Values['beforeInit']:= 'function beforeInit(sender, config)'+#13#10+ '{'+#13#10+ ' Ext.apply(sender, {'+#13#10+ ' multiSelect: true,'+#13#10+ ' plugins: []'+#13#10+ ' });'+#13#10+ ' config.listConfig = {'+#13#10+ ' listeners: {'+#13#10+ ' show: function(picker) {'+#13#10+ ' picker.setMinWidth(picker.listEl.getTextWidth() + 20);'+#13#10+ ' }'+#13#10+ ' }'+#13#10+ ' }; '+#13#10+ '}'; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2023 Share Posted August 21, 2023 Hello, ? Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 hello, it was at true, but when i choose false i ve this : so close ... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2023 Share Posted August 21, 2023 48 minutes ago, Didier said: hello, it was at true, but when i choose false i ve this Okay, if you will use UniComboBox for test? Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 it's okay : Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2023 Share Posted August 21, 2023 Which build of uniGUI are you using? 2 hours ago, Didier said: I couldn't reproduce this. Can you test it with this demo?: \FMSoft\Framework\uniGUI\Demos\Desktop\CheckComboBox Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 i just add : UniCheckComboBox2.Items.Add('Triggerfish'); UniCheckComboBox2.Items.Add('Wrasse'); UniCheckComboBox2.Items.Add('Cod'); UniCheckComboBox2.Items.Add('Shark'); UniCheckComboBox2.Items.Add('4 - Alpes de Hte Provence'); MatchFieldWidth : true or false -> it's the same Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 hmmm, fail it works with MatchFieldWidth to false Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 i used 1.90.0.1564 Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2023 Author Share Posted August 21, 2023 i don't understand why it's not working Maybe one other code in the application. could i add 20px (for example) programmatically ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2023 Share Posted August 21, 2023 @Didier Can you make a simple testcase? Quote Link to comment Share on other sites More sharing options...
Didier Posted August 22, 2023 Author Share Posted August 22, 2023 i can't reproduce on un test case I ve certainly extj or js code somewhere which do this. I ll try to found it... i can't to up the width Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2023 Share Posted August 22, 2023 1 minute ago, Didier said: I ve certainly extj or js code somewhere which do this. I ll try to found it... If you need "remote" support let me know. Quote Link to comment Share on other sites More sharing options...
Didier Posted August 22, 2023 Author Share Posted August 22, 2023 hello, i can reproduce on your test : add line here : UniCheckComboBox1.Selected[0] := True; UniCheckComboBox1.Selected[2] := True; UniCheckComboBox2.Items.Add('Triggerfish'); UniCheckComboBox2.Items.Add('Wrasse'); UniCheckComboBox2.Items.Add('Cod'); UniCheckComboBox2.Items.Add('Shark'); UniCheckComboBox2.Items.AddObject('Alpes de Hte Provence',TObject(Integer('4'))); UniCheckComboBox2.Items.Add('Triggerfish'); UniCheckComboBox2.Items.Add('Wrasse'); UniCheckComboBox2.Items.Add('Cod'); UniCheckComboBox2.Items.Add('Shark'); UniCheckComboBox2.Items.AddObject('Alpes de Hte Provence',TObject(Integer('4'))); UniCheckComboBox2.Items.Add('Triggerfish'); UniCheckComboBox2.Items.Add('Wrasse'); UniCheckComboBox2.Items.Add('Cod'); UniCheckComboBox2.Items.Add('Shark'); UniCheckComboBox2.Items.AddObject('Alpes de Hte Provence',TObject(Integer('4'))); and you'll get my problem ->the scroll bar only on firefox, i don't have the problem on chrome Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2023 Share Posted August 22, 2023 Okay, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2023 Share Posted August 23, 2023 19 hours ago, Didier said: and you'll get my problem ->the scroll bar Not a scrollbar, but some text wraps, doesn't it? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2023 Share Posted August 23, 2023 You can try this approach: UniCheckComboBox.ClientEvents.UniEvents -> function beforeInit(sender, config) { if (config.matchFieldWidth == false) { config.listConfig.listeners = { beforeshow: function(picker) { var itemWA = []; sender.getStore().getData().getRange().forEach(function(item) { itemWA.push(Ext.util.TextMetrics.measure(picker.getId(), item.getData().val).width); }); picker.minWidth = Math.max(...itemWA) + 70 } } } } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2023 Share Posted August 23, 2023 I may have chosen a complicated workaround. Quote Link to comment Share on other sites More sharing options...
Didier Posted August 23, 2023 Author Share Posted August 23, 2023 Hello, yes it is complicate just for that but it works. can we just make a test before and not use this code for chrome ? originally it works on chrome but not on the others. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2023 Share Posted August 23, 2023 6 minutes ago, Didier said: originally it works on chrome but not on the others. Yes, you can add this condition: if (!Ext.isChrome) { } Quote Link to comment Share on other sites More sharing options...
Didier Posted August 23, 2023 Author Share Posted August 23, 2023 thank you. all work fine Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2023 Share Posted August 23, 2023 Great! 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.