Jump to content

newsanti

uniGUI Subscriber
  • Posts

    323
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by newsanti

  1. 1 minute ago, Sherzod said:

    What exactly?

      if oPanelX is TUniCustomContainerPanel then
         begin
            var oPanel:= TUniCustomContainerPanel(oPanelX);
            if Assigned(oPanel) then
              begin
                var oJS:= oPanel.JSInterface;
                oJS.JSAddListener('painted',
                oJS.JSFunction('sender',
                'sender.bodyElement.setStyle(''background'', ''url('+S+')'')'));

                oJS.JSAddListener('painted',
                oJS.JSFunction('sender',
                'sender.bodyElement.setStyle(''background-repeat'', ''no-repeat'')'));

                oJS.JSAddListener('painted',
                oJS.JSFunction('sender',
                'sender.bodyElement.setStyle(''background-size'', ''100% 100%'')'));
              end;
         end;
    I try setting in one command.

  2. 19 minutes ago, Sherzod said:

    Hello,

    I don't know where you got it from:

     

    In your case this will be correct:

    procedure TMainmForm.UnimFormCreate(Sender: TObject);
    begin
      var oPanel:= UnimContainerPanel1;
    //  TuniLayoutConfig(oPanel.LayoutConfig).Cls:= 'mainbackground';
      var oJS:= oPanel.JSInterface;
      oJS.JSAddListener('painted',
      oJS.JSFunction('sender',
      'sender.bodyElement.setStyle(''background'', ''url(/files/mainlogo2.jpg) repeat scroll 0% 0%'')'));
    end;

     

    how to set cover of image with setstyle?
      var oPanel:= UnimContainerPanel1;
    //  TuniLayoutConfig(oPanel.LayoutConfig).Cls:= 'mainbackground';
      var oJS:= oPanel.JSInterface;
      oJS.JSAddListener('painted',
      oJS.JSFunction('sender',
      'sender.bodyElement.setStyle(''background'', ''url(/files/mainlogo2.jpg)'')'));

      oJS.JSAddListener('painted',
      oJS.JSFunction('sender',
      'sender.bodyElement.setStyle(''background-size'', ''cover'')'));

    Can coding in single command?
     

  3. procedure TMainmForm.UnimFormCreate(Sender: TObject);
    begin
      var oPanel:= UnimContainerPanel1;
    //  TuniLayoutConfig(oPanel.LayoutConfig).Cls:= 'mainbackground';  // work OK.
      var oJS:= oPanel.JSInterface;
      oJS.JSAddListener('afterrender',
      oJS.JSFunction('sender',
      'document.body.style.background=''url("/files/mainlogo2.jpg");repeat scroll 0% 0%'''));  //Mainlogo2.jpg not shown.
    end;

     

    FormBackground.zip

  4. 45 minutes ago, Sherzod said:

    But what's stopping you from using one class?

    .customGrid .x-column-header{
       line-height: normal;
      vertical-align: middle;
      }
    .customGrid .x-title-text{
      line-height: normal;
      vertical-align: middle;
      }
    
    .customGrid .x-grid-td .x-grid-cell-inner {
      line-height: normal;
      vertical-align: middle;
      text-overflow: ellipsis;
      overflow: hidden;
      }

     

    customGrid3 .x-grid-td .x-grid-cell-inner {
      line-height: normal;
      vertical-align: middle;
      text-overflow: ellipsis;
      overflow: hidden;
      }
    .customGrid1 .x-column-header{

       line-height: normal;
      vertical-align: middle;
     } 
    if combine above (customCSSGrid1&customCSSGrid3)  customCSSGrid3 display incorrect.

    customCSSGrid4 .x-grid-cell-row-numberer {
      font-weight: bold;
      font-size: 14px;
      font-family: cursive, "Times New Roman", Times, serif;
    }

    Need other customCSSGrid4 to customize grid row number.

    2023-09-12_01-55-52.png

  5. 9 minutes ago, Sherzod said:

    How do you understand this? I don't quite understand.

    .customGrid1 .x-column-header{
       line-height: normal;
      vertical-align: middle;
      }
    .customGrid2 .x-title-text{

      line-height: normal;
      vertical-align: middle;
      }

    .customGrid3 .x-grid-td .x-grid-cell-inner {
      line-height: normal;
      vertical-align: middle;
      text-overflow: ellipsis;
      overflow: hidden;
      }

    .customGrid4 .x-grid-cell-row-numberer {
      font-weight: bold;
      font-size: 14px;
      font-family: cursive, "Times New Roman", Times, serif;
    }

    Is possible to combine multiple css with LayoutConfig.Cls 
    Example: dbGrid.LayoutConfig.cls := 'customGrid1;customGrid2; customGrid3;customGrid4';

  6. 8 hours ago, Sherzod said:

    Well,

    1. CustomCSS ->

    .customGrid .x-grid-cell-row-numberer {
      font-weight: bold;
      font-size: 14px;
      font-family: cursive, "Times New Roman", Times, serif;
    }

    2. OnCreate or when created dynamically ->

    UniDBGrid.JSInterface.JSConfig('cls', ['customGrid']);

     

    Can setting cls = 'customGrid1;customGrid2; customGrid3'?

  7. 8 hours ago, Sherzod said:

    Well,

    1. CustomCSS ->

    .customGrid .x-grid-cell-row-numberer {
      font-weight: bold;
      font-size: 14px;
      font-family: cursive, "Times New Roman", Times, serif;
    }

    2. OnCreate or when created dynamically ->

    UniDBGrid.JSInterface.JSConfig('cls', ['customGrid']);

     

    image.png.10838470e7defa445f04125d96286c39.png

      oList.Add('.customGridHeader .x-column-header{');
      oList.Add('    line-height: normal;');
      oList.Add('    vertical-align: middle;');
      oList.Add('}');

      oList.Add('.customGridTitle .x-title-text{');
      oList.Add('    line-height: normal;');
      oList.Add('    vertical-align: middle;');
      oList.Add('}');

      oList.Add('.customGridBody .x-grid-td .x-grid-cell-inner {');
      oList.Add('    line-height: normal;');
      oList.Add('    vertical-align: middle;');
      oList.Add('    text-overflow: ellipsis;');
      oList.Add('    overflow: hidden;');
      oList.Add('}');

    How to combine .x-grid-cell-row-number css with above css,
    or coding js at runtime with dbgrid jsInterface? 

  8. 5 hours ago, Sherzod said:

    So, has the issue been resolved?

    function headerclick(ct, column, e, t, eOpts)
    {
        var timeNow = (new Date()).getTime();
        if (this.lastClicked) {
            if (timeNow > (this.lastClicked + 500)) {
            } else {
                ajaxRequest(this, "columndblclick", ["columntext=" + column.text,
                 "columnindx=" + column.dataIndex]);
            }
        }
        this.lastClicked = timeNow;
    }
     

    This script cause dbgrid do not fire grid.edit.

  9. On 2/1/2016 at 3:45 PM, Sherzod said:

    Hi,

     

    If I understood you correctly, try:

     

    UniDBGrid1 -> ClientEvents -> ExtEvents [Ext.data.Store[store] ] add store.load fn:

    function store.load(sender, records, successful, eOpts)
    {
      sender.grid.columnManager.columns.forEach(function(col){col.autoSize()})
    }

    Best regards.

    How to write code only columns[0] autosize?

  10. 2 hours ago, Sherzod said:

    Well,

    Does this solution work for all columns?

     

    .x-grid-cell-inner {
        text-overflow: ellipsis !important;
    }

    I try above method but not work.

    and try to combine with this css in servermodule

      .customGridHeader .x-column-header {
          line-height: normal;
         vertical-align: middle;
      }

      .customGridBody .x-grid-td  .x-grid-cell-inner{
          line-height: normal;
          vertical-align: middle;

          text-overflow: ellipsis;
      }

    image.png.bc9f0ab7881648ed333de46df69c457b.png

     

×
×
  • Create New...