ana.rodrigues Posted March 4, 2021 Share Posted March 4, 2021 Hi, I have this problem. I want to have a horizontal scrollbox to appear in a UniListBox and UniTreeView. I only have Vertically. When my items have a caption longer than the width of the UniListBox or UniTreeView it doesn't show it tottally. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2021 Share Posted March 4, 2021 27 minutes ago, ana.rodrigues said: I have this problem. I want to have a horizontal scrollbox to appear in a UniListBox and UniTreeView. I only have Vertically. When my items have a caption longer than the width of the UniListBox or UniTreeView it doesn't show it tottally. Hello, Try this approach for now (UniTreeView): procedure TMainForm.UniFormCreate(Sender: TObject); begin UniTreeView1.JSInterface.JSAddListener('afterlayout', 'function(){this.getEl().down(".x-tree-view").setStyle("overflowX", "auto")}'); end; 1 Quote Link to comment Share on other sites More sharing options...
ana.rodrigues Posted March 5, 2021 Author Share Posted March 5, 2021 16 hours ago, Sherzod said: Hello, Try this approach for now (UniTreeView): procedure TMainForm.UniFormCreate(Sender: TObject); begin UniTreeView1.JSInterface.JSAddListener('afterlayout', 'function(){this.getEl().down(".x-tree-view").setStyle("overflowX", "auto")}'); end; Thank you so much. It worked!!! Is there a similar way for TUniListboxes also? Best Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 5, 2021 Share Posted March 5, 2021 1 minute ago, ana.rodrigues said: Is there a similar way for TUniListboxes also? I will check. 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 5, 2021 Share Posted March 5, 2021 26 minutes ago, ana.rodrigues said: Is there a similar way for TUniListboxes also? Can you try this approach? 1. CustomCSS: .customList .x-list-plain { width: max-content; } 2. UniListBox -> LayoutConfig -> Cls = customList Quote Link to comment Share on other sites More sharing options...
ana.rodrigues Posted March 5, 2021 Author Share Posted March 5, 2021 I tried that aproach, but it didn't put a horz scrollbar, it still puts another line, when exceeding the width of the ListBox. I send you what i changed in the properties of the listbox and the result. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 5, 2021 Share Posted March 5, 2021 48 minutes ago, Sherzod said: CustomCSS: .customList .x-list-plain { width: max-content; } 2. UniListBox -> LayoutConfig -> Cls = customList 1 Quote Link to comment Share on other sites More sharing options...
ana.rodrigues Posted March 5, 2021 Author Share Posted March 5, 2021 11 minutes ago, Sherzod said: Sorry, didn't understood at first. It is working! Many Thanks! Best Regards 1 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.