Jump to content

Point

uniGUI Subscriber
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Point

  1. On 8/28/2019 at 7:56 PM, Sherzod said:

    Can you try this hasty workaround?

    procedure TMainForm.UniFormReady(Sender: TObject);
    begin
      UniFileUploadButton1.JSInterface.JSCode(#1+
            '.fileInputEl.addBeforeListener("change", function(a, b) {'+
            '  isValid = true;'+
            '  for (i = 0; i < b.files.length; i++) {'+
            '      if (b.files[i].size > '#1'.maxSize) {'+
            '          isValid = false;'+
            '          Ext.MessageBox.show({'+
            '              title: "MaxSize = " + '#1'.maxSize,'+
            '              msg: b.files[i].name + ": " + '#1'.maxSizeError,'+
            '              icon: Ext.MessageBox.ERROR,'+
            '              buttons: Ext.Msg.OK'+
            '          });'+
            '          return false'+
            '      }'+
            '  }'+
            '  return isValid;'+
          '});'
      );
    end;

     

    how to implement this code on UnimFileUploadButton (mobile)?. on mobile version it doesn't have maxallowsize property

  2. after dizzing all day i found the problem. it's because '069' code. 

    edtUser.JSInterface.JSCallDefer('focus',[false], 100);

    the code is placed in the button login without condition so it's cause rise error in browser inspector. after remove it, the error disappear.

    thanks you sherzod for attention.

    • Thanks 1
  3. 9 minutes ago, irigsoft said:

    If You try with:

    YouruniMap.ClientEvents.ExtEvents.Values['onafterrender'] := 'function afterrender(sender, eOpts){ {sender.el.setStyle("z-index", "100")}; }';

    wait, seem it's work. unimap must set to autoZindex = false.

    • Thanks 1
  4. 7 minutes ago, irigsoft said:

    I use this to set z-index =auto on my TuniDBGrid pagingBar

    TuniDBGrid (MyComponent).ClientEvents.ExtEvents.Values['onafterrender'] := 'function afterrender(sender, eOpts){if (sender.headerCt) {sender.headerCt.el.setStyle("z-index", "auto")}; if (sender.pagingBar) {sender.pagingBar.el.setStyle("z-index", "auto")}; }';

    can you try to use it on Mask or uniMap 

    i dont know the name element for uniMap.

  5. Hi, i setted like this :

      uniMap.CreateOrder := 1200;
      uniMap.MapControlOptions.AutoZIndex := False;

    unfortunately still doesn't work. i think it's about z-index. but i dont know how to set it.  i check in leaflet.css too many z-index.

    .leaflet-pane         { z-index: 400; }
    
    .leaflet-tile-pane    { z-index: 200; }
    .leaflet-overlay-pane { z-index: 400; }
    .leaflet-shadow-pane  { z-index: 500; }
    .leaflet-marker-pane  { z-index: 600; }
    .leaflet-tooltip-pane   { z-index: 650; }
    .leaflet-popup-pane   { z-index: 700; }
    
    .leaflet-map-pane canvas { z-index: 100; }
    .leaflet-map-pane svg    { z-index: 200; }

     

  6. Quote

    Will you use the UniMenuButton?

    Yes.

    Quote

    What type of icon are you using?

    Font awesome.

    ==

    i was tried that script like this:

    on server module :

    .x-myicon-menu .x-menu-item-icon-default{
       font-size: 12px;
    }
    
    .x-myicon-submenu .x-menu-item-icon-default{
       top: 9px;
       font-size: 9px;
    }

     

    on ExtEvents, menu button :

    function afterrender(sender, eOpts)
    {
        var me=sender;
        var _addCls = function (item) {
            item.forEach(function (_item) {
                _item.addCls('x-myicon-submenu');
                if (_item.menu) {
                    _addCls(_item.menu.items.items)
                }
            })
        };
        
        me.addListener('menushow',     
            Ext.defer(function () {
                if (me.menu) {
                    _addCls(me.menu.items.items);
                }
            }, 100)
        );
    }

     

    the problems :

    1. this script apply to all menu icon. i need change icon on sub menu only.
    2. the sub menu does not appear when the menu button is clicked on second time.

  7. hello,

    server module -> customCSS:

    .apopupmenu .x-menu-item-icon-default{
       font-size: 9px;
    }

    On MainForm:

    procedure TMainForm.UniFormReady(Sender: TObject);
    begin
      with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do
      begin
        JSConfig('cls', ['apopupmenu']);
      end;
    end;

    icon size not change for sub menu item. actually what I need is the sub menu icon to be smaller than the menu item. how to?

    Screenshot_1.png

  8. Hi hayri,

    I don't know if this is possible or not. trying to create a datasnap server application using unigui. if possible my plan will use hyperserver feature as a datasnap server farm. when session on application datasnap = 0, the application requests to hyperserver instance to restart it but remains on the same node id.

  9. On 3/3/2022 at 12:04 PM, Point said:

    hi Frederick,

    Put unicontainer, panel or pagecontrol on area A, then embed a form or aframe, use create an release's technique to reduce memory usage.  

    for example like this :

    AForm := TUniForm1.Create(UniSession.uniApplication)
    AForm.parent := unicontainer1;

    AFrame := TUniForm1.Create(MainForm)
    AFrame.parent := panel1; //uniTabsheet1;
     

     

    corrected :

    AFrame := TUniFrame1.Create(MainForm)
    AFrame.parent := panel1; //uniTabsheet1; 

×
×
  • Create New...