Jump to content

Recommended Posts

Posted

Hello!

If set DisplayMemo=True for column in UniDbGrid, that it's working fine, text is wraping:

image.png.11086643bf9f057877685f7918cf0e71.png

But, if set DisplayMemo=True for column and use for field, that text is not wraping in caption of UniButtonWidget:

image.png.b8e9ca90a17d7a430904a24b1d9df338.png

Please, help me make that text will be wraping when I use UniButtonWidgetFor column in UniDBgrid?

Posted

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?

Posted

 

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:

image.png.af8b7cfa7ed48996ea525d8cb6071c34.png

Posted
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.

Posted
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.

Posted
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');
    };
}

 

  • Like 1
Posted
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?

image.png.d9e0eed7e7781ecacff8d15e95c8a684.png

I mean, is it possible make auto adjust height for the button?

Posted
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');
    };
}

 

  • Like 2
Posted
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! :)

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...