Jump to content

newsanti

uniGUI Subscriber
  • Posts

    323
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by newsanti

  1.   with UnimComboBox1 do
        ClientEvents.UniEvents.Values['beforeInit'] :=
          'function beforeInit(sender, config) {'+
          '    config.listConfig = {'+
          '    tpl: new Ext.XTemplate('+
          '    ''<tpl for=".">'+
          '     <div class="x-boundlist-item" style="{[this.check(values)]}"'+
          '     >{val}</div></tpl>'''+
          '     ,{ disableFormats: true,'+
          '        check: function(values) {'+
          '               return "font-family: Noto Serif Thai;"'+
          '        }'+   //end..check
          '      }'+
          '    )'+      //end..XTemplate
          '    }'+      //end..listconfig
          '}';          //end..beforeInit

    Not Work.

    https://fiddle.sencha.com/#fiddle/1bpq&view/editor

    Ext.application({
        name : 'Fiddle',
        
        launch : function() {
            // The data store containing the list of states
            var states = Ext.create('Ext.data.Store', {
                fields: ['abbr', 'name'],
                data : [
                    {"abbr":"AL", "name":"Alabama"},
                    {"abbr":"AK", "name":"Alaska"},
                    {"abbr":"AZ", "name":"Arizona"}
                ]
            });
            
            // Create the combo box, attached to the states data store
            Ext.create('Ext.form.ComboBox', {
                fieldLabel: 'Choose State',
                store: states,
                queryMode: 'local',
                displayField: 'name',
                valueField: 'abbr',
                renderTo: Ext.getBody(),
                // Mark records with abbr: "AL" with red color
                tpl: '<tpl for=".">' +
                '<div class="x-boundlist-item" style="font-family: Noto Serif Thai;" >{name}</div>' +
                '</tpl>'
            });
        }
    });

    Mobile Combobox.zip

  2. On 10/3/2016 at 3:33 PM, Sherzod said:

     

    Hi,

     

    Can you try this?!

    For example:

    <video src="video.ogv" id="myVideo">
        video not supported
    </video>
    
    <script type='text/javascript'>
        document.getElementById('myVideo').addEventListener('ended',myHandler,false);
        function myHandler(e) {
             // What you want to do after the event
             // ajaxRequest(...);
        }
    </script>

    http://stackoverflow.com/questions/2741493/detect-when-an-html5-video-finishes

     

    Best regards.

    procedure TsnbxUnimCustomApp001MainForm.Run_PLAY(Sender: TObject);
    begin
      var oForm:= TMainmForm(Form);
      oForm.Image1.Visible:= False;
      var oFrame:= oForm.UnimHTMLFrame1;
      oFrame.HTML.Text:=
      '<!DOCTYPE html> '+
      ' <html>'+
      ' <body>'+
    //  ' <video id="video01" width= "100%" height="100%" controls muted loop autoplay>'+
      ' <video id="video01" width= "100%" height="100%" muted loop autoplay>'+
      '    <source src="files/video01.mp4" type="video/mp4">'+
      ' </video>'+
      ' </body>'+
      ' </html>

    While Video Playing..if user Click on HTLMFrame (Video),

    How to  Stop Playing?  or How to Stop Playing with Code? 

  3. 15 minutes ago, Sherzod said:

    One possible solution:

    procedure TMainmForm.UnimFormCreate(Sender: TObject);
    begin
      UnimSelect1.JSInterface.JSAddListener('painted', 'function(){this.inputElement.setStyle("text-align", "right"); this.inputElement.setStyle("line-height", "normal");}');
    end;

     

    work. Great!

    image.png.fe92ee20eef10a1cbf4213612a70b09f.png

    • Upvote 1
  4. On 5/28/2021 at 12:56 PM, Sherzod said:

    Hello,

    Try this code:

    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      with UniComboBox1 do
        ClientEvents.UniEvents.Values['beforeInit'] :=
          'function beforeInit(sender, config) {'+
          '    config.listConfig = {'+
          '        tpl: new Ext.XTemplate('+
          '            ''<tpl for="."><div class="x-boundlist-item" style="{[this.check(values)]}">{val}</div></tpl>'', {'+
          '                disableFormats: true,'+
          '                check: function(values) {'+
          '                    if (values["val"] !== "Inactive") {return "'+ Font.ToStyleString(True) +'"} else {return "'+ Font.ToStyleString(True) +'; color: red;"}'+
          '                }'+
          '            }'+
          '        )'+
          '    }'+
          '}';
    end;

     

    TunimComboBox do not work.

  5. 9 hours ago, Sherzod said:

    Try this:

    constructor TMainForm.Create(AOwner: TComponent);
    begin
      inherited;
      with UniServerModule.CustomCSS do
      begin
        Add('.round1 .x-panel-body {');
        Add('   border-radius: 50px;');
        Add('}');
      end;
      TUniLayoutConfig(UniPanel1.LayoutConfig).Cls:= 'round1';
    end;

     

    work.. if code with servermodule.create and mainmodule.create.

    not work (round3) if code with mainm.create.

    How to customize css in form at run-time ? (Update MainPain CSS at run-time)

    it work only refresh browser again. (After add CSS to ServerModule.CustomCSS>>work only new MainPage)

    runtimeCSS.zipimage.png.4b8a902c785deb93f1a08f39f3831137.png

  6. On 7/21/2015 at 4:37 PM, Sherzod said:

    Hi,

     

    One of the possible solutions, try:

     

    UniScrollBox1 -> ClientEvents -> ExtEvents...

    function afterrender(sender, eOpts)
    {
       sender.el.dom.style.overflowY = "hidden"
    }

    Best regards.

    How to code for TunimScrollBox?

×
×
  • Create New...