Jump to content

eduardosuruagy

uniGUI Subscriber
  • Posts

    831
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by eduardosuruagy

  1. 44 minutes ago, Sherzod said:

    Você poderia esclarecer sua pergunta e anexar uma captura de tela normal?

    The example I used is on the way: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\Grid - WidgetColumn2

    Looking at the image you can see that the column "Length (cm)" has random values and the component "UniProgressbarWidget1" that is connected to the column has a maximum value of 200.
    See that in the arrow that I put there is a record that has a value of 400, how can I take the value that is in that line and put it in "UniProgressbarWidget1"

    Sem título.png

  2. I am using the UniProgressbarWidget component and wanted to adjust its maximum value based on a value in my dbgrid line, how can I do this?

    If in the dbgrid line the field has a total of 10 the maximum value of my UniProgressbarWidget would be 10

    Sem título.png

  3. On 11/4/2017 at 12:45 PM, Sherzod said:

    1. UniServerModule -> CustomCSS:

    
    .mycalendar .x-monthpicker {
      height: auto !important; 
      width: auto !important;
    }

    2. UniCalendar -> ClientEvents -> ExtEvents -> function container.afterrender:

    
    function container.afterrender(sender, eOpts)
    {
        sender.addCls('mycalendar');
    }

    3. UniCalendar -> ClientEvents -> UniEvents -> function picker.beforeInit:

    
    function picker.beforeInit(sender, config)
    {
        config.width= "100%"
    }

    4. UniCalendar -> ClientEvents -> ExtEvents -> function picker.resize:

    
    function picker.resize(sender, width, height, oldWidth, oldHeight, eOpts)
    {
        var container=sender.ownerCt;
        var headerHeight=Ext.get(container.el.select('.x-datepicker-header').elements[0]).getHeight();
        var footerHeight=Ext.get(container.el.select('.x-datepicker-footer').elements[0]).getHeight();
        
        var tableHeight=container.el.getHeight()-headerHeight-footerHeight;
        
        container.el.select('.x-datepicker-inner').elements[0].style.height=tableHeight-2;
        container.el.select('.x-datepicker-inner').elements[0].style.top=0;
        
        container.el.select('table td .x-datepicker-date').elements.forEach(function(c){c.style.height="100%"});
        
        container.doLayout();
    }

    I have a problem with the TUniCalendar component, I put it inside a UniContainerPanel and aligned UniCalendar = alClient even though it keeps cutting the days.

    My form is aligned with uniAlignmentServer

    Sem título.png

  4. 18 minutes ago, Sherzod said:

    que erro você está tendo?

    _rsov_(O15,0);_rsov_(O19,0); O49=new Ext.window.Window({id:"O49_id",retfalse:{},onEsc:Ext.emptyFn,layout:"fit",title:"UniForm1",modal:true,closeToolText:"",maximizable:true,minimizable:true,resizable:true,icon:"/cache/boostro_exe/uUTMWhJDaH10718E7F1/favicon.ico",iconCls:"x-uni-icon-contain",uniFMask:{beforeclose:true},width:709,height:409,x:518,y:226});O49.nm="O49";_cdo_("UniForm1");UniForm1.ajxS=AjaxSuccess;UniForm1.ajxF=AjaxFailure;O49.rootObj=true;UniForm1.appRoot="/";_cdo_(null,O49,"window",UniForm1); O51=new Ext.form.Panel({id:"O51_id",border:false,uActive:false,tabItems:new Ext.util.MixedCollection(),layout:"absolute"});O51.nm="O51";_cdo_(null,O51,"form",UniForm1);O49.add(O51); O59=(function(P0){return Ext.xR("this="+P0.nm+""+_gv_(O51),O49,"beforeclose");});O59.nm="O59";O49.on("beforeclose",O59); O5A=(function(P0){_saf_(P0);return Ext.xR("this="+P0.nm+""+_gv_(O51),O49,"activate");});O5A.nm="O5A";O49.on("activate",O5A); O5B=(function(P0){return Ext.xR("this="+P0.nm+""+_gv_(O51),O49,"deactivate");});O5B.nm="O5B";O49.on("deactivate",O5B);O49.on("deactivate",function(f){_sdf_(f)}); O5C=new Ext.panel.Panel({id:"O5C_id",bodyBorder:false,html:"\x3Ctable border=\"0\" width=\"100%\" height=\"100%\"\x3E\x3Ctr\x3E\x3Ctd id=\"O5C_id_td\" style=\"color:#000000;text-align:center\"\x3EUniPanel1\x3C/td\x3E\x3C/tr\x3E\x3C/table\x3E",header:false,layout:"absolute",width:256,height:128,x:296,y:112});O5C.nm="O5C";_cdo_("UniPanel1",O5C,null,UniForm1); O64=new Object({});O64.nm="O64";_cdo_("UniBoostro1",O64,null,UniForm1);O51.add([O5C]);uniVars._loginFrm=null; O65=(function(P0,P1,P2){return Ext.xR("this="+P0.nm+"&w="+P1+"&h="+P2+""+_gv_(O51),O49,"resize");});O65.nm="O65";O49.on("resize",O65); O66=(function(P0,P1,P2){return Ext.xR("this="+P0.nm+"&x="+P1+"&y="+P2+""+_gv_(O51),O49,"move");});O66.nm="O66";O49.on("move",O66); O67=(function(P0){return Ext.xR("this="+P0.nm+""+_gv_(O51),O49,"maximize");});O67.nm="O67";O49.on("maximize",O67); O68=(function(P0){return Ext.xR("this="+P0.nm+""+_gv_(O51),O49,"minimize");});O68.nm="O68";O49.on("minimize",O68); O69=(function(P0){return Ext.xR("this="+P0.nm+""+_gv_(O51),O49,"restore");});O69.nm="O69";O49.on("restore",O69);O49.show("");O49.retfalse.beforeclose=1;_axy_(O49);O49.uniMask={ldMask:false,maskWaitData:false,maskUseMsg:true};O49.uniMask.targetObj=null;$( "#"+O5C.el.id ).addClass("O64_bootstro");$( "#"+O5C.el.id ).attr({"data-bootstro-width":"300px","data-bootstro-step":0,"data-bootstro-placement":"top","data-bootstro-content":"UniPanel"});bootstro.start(".O64_bootstro",{nextButtonText:"Next",prevButtonText:"Prev",finishButtonText:"Ok. I Got It.",stopOnBackdropClick:true,stopOnEsc:true,onComplete:function(p){ajaxRequest(O64, "onComplete", {Index: p.idx});},onExit:function(p){ajaxRequest(O64, "onExit", {Index: p.idx});},onStep:function(p){ajaxRequest(O64, "onStep", {Index: p.idx});}});

  5. 50 minutes ago, Sherzod said:

    "Com Ext JS 6.5, chegou o inputMask. No momento, ele só está disponível no kit de ferramentas Modern, mas o Classic o alcançará em breve."

    https://docs.sencha.com/extjs/6.5.0/guides/whats_new/whats_new.html#whats_new-_-whats_new_-_input_masking


    Mas parece que esta configuração não funciona corretamente para o Classic.

    The theme I'm using is triton.modified

  6. On 10/30/2020 at 5:35 PM, Sherzod said:

    Approximate solution...

    
    procedure TMainForm.UniFormReady(Sender: TObject);
    begin
      with UniDBGrid1 do
      begin
        //first btn
        JSInterface.JSCode(#1'.columnManager.columns[6].items[0].getClass = function(v, metadata, record) {'+
          '    return "x-hidden"'+
          '};');
    
        //second btn
        JSInterface.JSCode(#1'.columnManager.columns[6].items[1].getClass = function(v, metadata, record) {'+
          '    return "x-hidden"'+
          '};');
      end;
    end;

     

    Sorry for my insistence, but I couldn't get it to work, here is an example I did.

    DbGrid.rar

  7. I have an error when creating a TUniDateTimePicker at runtime, it lets me enter a date 11/1/2020123456789

     

    I'm creating it this way:

          cDateTimePicker: = TUniDateTimePicker.Create (sbox);
          cDateTimePicker.Parent: = sbox;
          cDateTimePicker.TabStop: = True;
          cDateTimePicker.Name: = 'A' + formatfloat ('000', QryParametros1IFP_SEQ_PARAMETRO.asInteger);
          cDateTimePicker.Top: = TopTotal - 5;
          cDateTimePicker.Height: = Height;
          cDateTimePicker.Width: = SmallerWidth;
          cDateTimePicker.TabOrder: = _viOrder;
          cDateTimePicker.Font.Size: = Source;
          cDateTimePicker.ClearButton: = True;
          cDateTimePicker.Enabled: = (QryParametros1IFP_INATIVO.AsString <> 'S');
          cDateTimePicker.ClientEvents.UniEvents.Add (
                    'beforeInit = function beforeInit (sender, config)' # 13 # 10 '{' # 13 # 10 '// disable' +
                    'ar the tip that always' # 233 'shown when hovering over the' +
                    'ta)' # 13 # 10 'config.formatText =' # 39 # 39 ';' # 13 # 10 # 13 # 10 '// SET THE CORRECT DATE QUAND' +
                    'O TYPE WITHOUT O /' # 13 # 10 'config.altFormats = "dmY | d / m / Y | n / j / Y | n / j / y | m /' +
                    'j / y | n / d / y | m / j / Y | n / d / Y | dmy | dmY | d / m | dm | dm | dmy | dmY |' # 65279'd | Ymd | n- ' +
                    'j | n / j ";' # 13 # 10 '}');

  8. 1 hour ago, Sherzod said:

    1. 

    
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      //conditions... True or False
      UniDBGrid1.JSInterface.JSAssign('isExcluded', [True]);
    end;

    2. 

    
    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
    {
        columns[6].items[0].getClass = function (v, metadata, record) {
            if (sender.isExcluded) {
                return 'x-hidden'
            } else {
                return 'x-uni-action-cls';
            }
        };
    }

     

    In this command can I pass which icon do I want to disable?

    UniDBGrid1.JSInterface.JSAssign ('isExcluded', [True]);

  9. 13 minutes ago, Sherzod said:

    Try analize this code:

    
    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
    {
        columns[6].items[0].getClass = function (v, metadata, record) {
            if (record.data[0] > 1500) {
                return 'x-hidden'
            } else {
                return 'x-uni-action-cls';
            }
        };
    }

     

    I can't get it fixed on the grid

    I need to do this via code:

    if User.Exclude = False then
       False
    else
    true;

  10. 28 minutes ago, Sherzod said:

    ?

    Can I make the icon invisible? This via code, the form's onShow for example.

    I have a column with 3 icons,
    1 = Preview
    2 = Change
    3 = Delete

    If my client is not allowed to delete I would like to make icon number 3 invisible, if he is not allowed to delete and change the record I have to disable icon number 2 and 3, you know?

  11. On 2/13/2019 at 2:07 AM, Sherzod said:

    Hi,

    Can you try to use this approach for now?

    UniDBGrid -> ClientEvents -> ExtEvents -> function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts):

    
    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
    {
        dataColIndx = 0;
        actionColIndx = 6;
        actionItemsIndx = 0;
        
        columns[actionColIndx].items[actionItemsIndx].isActionDisabled = function (grid, rowIndex, colIndex, items, record) {
            return (record.data[dataColIndx] > 1500);
        }
    }

     

    Via code how do I make an icon invisible? In the form show, I check if the user is allowed to delete the record, if he doesn't, I would like to make the icon invisible, as well as the other icons as well.
    The example you gave was based on a column value.

  12. 16 hours ago, Farshad Mohajeri said:

     

    Uma correção implementada.

     

    18 hours ago, Farshad Mohajeri said:

    Você lida com o evento OnClick da grade?

    Por que você não usa colunas de ação com evento OnColumnActionClick? Será mais preciso e não causará tais problemas.

    I'm using the grid's onClick, how can I use the OnColumnActionClick?

×
×
  • Create New...