artem_niko Posted March 28, 2020 Share Posted March 28, 2020 Hello! If set DisplayMemo=True for column in UniDbGrid, that it's working fine, text is wraping: But, if set DisplayMemo=True for column and use for field, that text is not wraping in caption of UniButtonWidget: Please, help me make that text will be wraping when I use UniButtonWidgetFor column in UniDBgrid? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2020 Share Posted March 28, 2020 Hello, 4 hours ago, Артем said: text is not wraping in caption of UniButtonWidget Well this is normal behavior I think. 4 hours ago, Артем said: help me make that text will be wraping when I use UniButtonWidgetFor column in UniDBgrid? And the maximum string value? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 28, 2020 Author Share Posted March 28, 2020 Just now, Sherzod said: And the maximum string value? No, not for the maximum string value. I need the caption text to wrap if its length exceeds the width of the button. For example: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2020 Share Posted March 28, 2020 28 minutes ago, Артем said: No, not for the maximum string value. I need the caption text to wrap if its length exceeds the width of the button. What I want to say is that the button is not really used for long lines, because wrapping is one of the points, the other is height ... Therefore, I asked about the approximate maximum string length. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 28, 2020 Author Share Posted March 28, 2020 Just now, Sherzod said: What I want to say is that the button is not really used for long lines, because wrapping is one of the points, the other is height ... Therefore, I asked about the approximate maximum string length. i'm don't know about the approximate string length...)) She can be different. Widht of the button - is fixed. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2020 Share Posted March 28, 2020 7 minutes ago, Артем said: i'm don't know about the approximate string length...)) Then try this approach: function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var widgetColIndx=1; columns[widgetColIndx].onWidgetAttach = function(column, widget, record) { widget.setTextAlign('left'); widget.setHeight(40); widget.btnInnerEl.setStyle('white-space', 'normal'); }; } 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 28, 2020 Author Share Posted March 28, 2020 10 minutes ago, Sherzod said: Then try this approach: function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var widgetColIndx=1; columns[widgetColIndx].onWidgetAttach = function(column, widget, record) { widget.setTextAlign('left'); widget.setHeight(40); widget.btnInnerEl.setStyle('white-space', 'normal'); }; } Cool! Working. But one question: why for the first button height not normal? I mean, is it possible make auto adjust height for the button? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2020 Share Posted March 28, 2020 8 minutes ago, Артем said: is it possible make auto adjust height for the button? ... I will try Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 28, 2020 Author Share Posted March 28, 2020 Just now, Sherzod said: ... I will try Thank's, I will be waiting answer from you! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2020 Share Posted March 28, 2020 28 minutes ago, Артем said: I will be waiting answer from you! Try this: function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var widgetColIndx=1; columns[widgetColIndx].onWidgetAttach = function(column, widget, record) { widget.setTextAlign('left'); widget.setHeight('auto'); widget.btnInnerEl.setStyle('white-space', 'normal'); }; } 2 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 28, 2020 Author Share Posted March 28, 2020 11 minutes ago, Sherzod said: Try this: function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var widgetColIndx=1; columns[widgetColIndx].onWidgetAttach = function(column, widget, record) { widget.setTextAlign('left'); widget.setHeight('auto'); widget.btnInnerEl.setStyle('white-space', 'normal'); }; } Perfect!!! Working very fine! Thank's, @Sherzod! 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.