Advertisement
Guest User

Untitled

a guest
Aug 11th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.90 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <vbox id="main" width="100%" height="100%" style="border:none; padding:0;spacing:5">
  3.  
  4.     <bind source="text1.text" target="text2.text" transform="text = ${value}" />
  5.     <bind source="text2" target="text3" transform="${value}" />
  6.     <bind source="vscroll1" target="text4" />
  7.    
  8.     <bind source="vscroll1" target="vscroll2" />
  9.     <bind source="vscroll2" target="vscroll1" />
  10.    
  11.     <bind source="vscroll1" target="hscroll1" />
  12.     <bind source="hscroll1" target="vscroll1" />
  13.    
  14.     <bind source="vscroll1" target="vscroll3" transform="${value * .75}" />
  15.     <bind source="vscroll1" target="vscroll4" transform="${value * .5}" />
  16.     <bind source="vscroll1" target="vscroll5" transform="${value * .25}" />
  17.     <bind source="vscroll1" target="vscroll6.pageSize" transform="${value * 5}" />
  18.    
  19.     <bind source="scrollview.height" target="scrollviewHeight" />
  20.     <bind source="scrollview.height" target="scrollviewHeightLabel" transform="${Std.int(value)}" />
  21.     <bind source="scrollviewHeight" target="scrollview.height" />
  22.  
  23.     <bind source="scrollview.width" target="scrollviewWidth" />
  24.     <bind source="scrollview.width" target="scrollviewWidthLabel" transform="${Std.int(value)}" />
  25.     <bind source="scrollviewWidth" target="scrollview.width" />
  26.    
  27.     <script>
  28.         function addScrollViewItem() {
  29.             var b = new haxe.ui.components.Button();
  30.             b.text = "Dynamic Button";
  31.             scrollview.addComponent(b);
  32.         }
  33.     </script>
  34.    
  35.     <hbox>
  36.         <button text="This is some text that will be clipped" width="100" repeater="true" onclick="trace(1);" />
  37.         <button text="Test" onclick="scrollview.width += 20;scrollview.height += 20;" />
  38.     </hbox>
  39.    
  40.     <hbox width="100%" style="border:none; padding:0">
  41.         <vbox width="100%">
  42.             <hbox>
  43.                 <textfield id="text1" text="bob" />
  44.                 <textfield id="text2" />
  45.                 <textfield id="text3" />
  46.                 <textfield id="text4" />
  47.             </hbox>
  48.            
  49.             <hbox>
  50.                 <vbox>
  51.                     <hbox>
  52.                         <vscroll id="vscroll1" height="300" />
  53.                         <vscroll id="vscroll2" height="300" />
  54.                         <vscroll id="vscroll3" height="300" />
  55.                         <vscroll id="vscroll4" height="300" />
  56.                         <vscroll id="vscroll5" height="300" />
  57.                         <vscroll id="vscroll6" height="300" />
  58.                     </hbox>
  59.                     <hscroll id="hscroll1" width="100%" />
  60.                 </vbox>
  61.                
  62.                
  63.                 <vbox width="200">
  64.                         <button text="Add Item" onclick="addScrollViewItem()" />
  65.                         <hbox width="100%">
  66.                             <label text="Width: " />
  67.                             <hscroll id="scrollviewWidth" width="100%" min="200" max="600" pos="200" />
  68.                             <label id="scrollviewWidthLabel" />
  69.                         </hbox>
  70.                         <hbox width="100%">
  71.                             <label text="Height: " />
  72.                             <hscroll id="scrollviewHeight" width="100%" min="200" max="600" pos="300" />
  73.                             <label id="scrollviewHeightLabel" />
  74.                         </hbox>
  75.                 </vbox>
  76.                
  77.                 <vbox>
  78.                     <hbox>
  79.                        
  80.                         <scrollview id="scrollview" width="200" height="300">
  81.                             <button text="100%" width="100%"/>
  82.                             <button text="100% + 10px margins" width="100%" marginRight="10" marginLeft="10" marginTop="10" style="margin-bottom: 10;" />
  83.                             <button text="button 2" id="scrollButton" />
  84.                             <button icon="img/slinky_tiny.jpg"/>
  85.                             <button text="button 3" />
  86.                             <button text="slinky" icon="img/slinky_tiny.jpg"/>
  87.                             <button text="button 4" />
  88.                             <image resource="img/slinky_tiny.jpg"/>
  89.                             <button text="button 5" />
  90.                             <button text="button 6" />
  91.                             <button text="button 7" />
  92.                             <button text="button 8" />
  93.                             <button text="button 9" />
  94.                             <button text="button 10" />
  95.                             <button text="button 11" />
  96.                             <button text="button 12" />
  97.                             <button text="button 13" />
  98.                             <button text="button 14" />
  99.                             <button text="button 15" />
  100.                         </scrollview>
  101.  
  102.                         <scrollview id="scrollview" width="150" height="300">
  103.                             <vbox>
  104.                                 <button text="button 1" width="200" />
  105.                                 <button text="button 2" />
  106.                                 <button text="button 3" />
  107.                                 <button text="button 4" />
  108.                                 <button text="button 5" />
  109.                                 <button text="button 6" />
  110.                                 <button text="button 7" />
  111.                                 <button text="button 8" />
  112.                                 <button text="button 9" />
  113.                                 <button text="button 10" />
  114.                                 <button text="button 11" />
  115.                                 <button text="button 12" />
  116.                                 <button text="button 13" />
  117.                                 <button text="button 14" />
  118.                                 <button text="button 15" />
  119.                             </vbox>
  120.                         </scrollview>
  121.                        
  122.                     </hbox>
  123.                    
  124.                     <scrollview width="100%" height="70">
  125.                         <hbox>
  126.                             <button text="button 1"/>
  127.                             <button text="button 2"/>
  128.                             <button text="button 3"/>
  129.                             <button text="button 4"/>
  130.                             <button text="button 5"/>
  131.                             <button text="button 6"/>
  132.                             <button text="button 7"/>
  133.                             <button text="button 8"/>
  134.                             <button text="button 9"/>
  135.                             <button text="button 10"/>
  136.                         </hbox>
  137.                     </scrollview>  
  138.                 </vbox>
  139.                
  140.             </hbox>
  141.         </vbox>
  142.     </hbox>
  143.    
  144.     <button text="Fill rest" width="100%" height="100%" />
  145. </vbox>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement