Jump to content

mhmda

uniGUI Subscriber
  • Posts

    1141
  • Joined

  • Last visited

  • Days Won

    157

Posts posted by mhmda

  1. Which extjs ver. you use and which unigui ver.??

     

    The idea here is:

     

    1. Remove all child panels from parent and save them in an array of objects. 

    2. Set flex property for every child (panel) as you wish.

    3. Create a new parent panel with specific 'layout' property (because you can't change 'layout' dynamically at run time of existing control -  parent).

    4. Attach the child panels which been saved in array to the new parent.

    5. Add the new parent to the form.

    6. Refresh the form to display the new components.

     

    * The case become more complicated when you have nested panels.

  2. You need to implement the 'layout' property for the container (hbox) and set the 'flex' property for the three panels.

     

    But we have to wait until Farshad implement this in Desktop applications (in mobile- unitouch it's exists).

     

    You can see this post: http://forums.unigui.com/index.php?/topic/5437-panel-layout-property-and-flex-property/?hl=flex

     

    For now you may use extra js code in client side to achieve what you want, here an example for your case:

    function window.afterrender(sender, eOpts)
    {
      Ext.apply(UniForm1.UniPanel1, {flex:1});
      Ext.apply(UniForm1.UniPanel2, {flex:1}); 
      Ext.apply(UniForm1.UniPanel3, {flex:1});
        
      var w=$(window).width();
      var h=$(window).height();  
      
      var first_panels  = UniForm1.containerxxx.removeAll(false);
    
      var first_container = Ext.create('Ext.panel.Panel', {
          border:false,
          width:w,
          height:h,
          layout: { type: 'hbox',align : 'stretch'},
          items:first_panels
      });
      
      
      UniForm1.form.add(first_container);
      UniForm1.form.doLayout();
    }
    

    It's working great but you need extra code...I hope Farshad will implement this soon :-)

     

    You can download attached project http://3msoft.net/mhmd/Layout_Flex.rar.

     

    I hope this will help you

  3. What is the content of the uniFrame: is it regular html content or you place a unigui components?

     

    You can use extjs query 'up' and 'down', for example if you have a uniframe called 'UniFrame1' on 'MainForm' and it contains other components you may use: MainForm.UniFrame1.down('xxx')

  4. Hi,

     

    I use the  (unihtmlframe) client side event 'resize' which calls ajaxRequest in server side, when the event fires it calls the server side and the 'resize' fires again and calling the server side....loop...

    the procedure in server side is empty with no code.

     

    I use the unigui 0.99.0.1169

     

     

  5. I also use TSilang with unigui for 3 languages, this component can save any property of any component for every language, you may export the translation to dictionary which make it easy to translate. And it gives you the expected width of every string for any language when you typing the translation. It is a great tool and has many advance properties.

    • Like 1
×
×
  • Create New...