Title: Scrollbarpolicy

Hi all

I have a problem with two wide grids wide grid.  By default both grids have there own scrollbar, basicly, i want them both to scroll together.

My idea was to place them together in one panel and let that have a scrollbar.
That way the textinput is always on the screen.  Well its not working, the scrollbar appears on the bottom of the application

So that the text label scrolls out of focus. 
I have played with the Hscrollpolicy of application and panel but can't find the right combination.
Can someone look at the code, and post a solution…..

Regards Tommy




<?xml version="1.0"?>
<!-- Simple example No:1 to demonstrate the DataGrid control -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF"
 hScrollPolicy="off"
 clipContent="true"
 creationComplete="dummycols()"
 >
<mx:Script >
<![CDATA[
import mx.controls.gridclasses.DataGridColumn;
var datagridcolumns:Array = new Array();
public function dummycols():Void{
        var datagridcolumn:DataGridColumn = new DataGridColumn();      
        datagridcolumn.columnName = "changed";
        datagridcolumn.headerText = "changed"; 
        datagridcolumn.editable = false;
        datagridcolumn.width = 500;
        datagridcolumns.push(datagridcolumn);          
       
        datagridcolumn = new DataGridColumn();
        datagridcolumn.columnName = "deleted";
        datagridcolumn.headerText = "delete";  
        /* font manipulatie */
        //datagridcolumn.setStyle("fontSize",8);
        datagridcolumn.width = 500;
        datagridcolumns.push(datagridcolumn);  
       
                datagridcolumn = new DataGridColumn();
        datagridcolumn.columnName = "Artist";
        datagridcolumn.headerText = "artist";  
        /* font manipulatie */
        //datagridcolumn.setStyle("fontSize",8);
        datagridcolumn.width = 500;
        datagridcolumns.push(datagridcolumn);  
       
                datagridcolumn = new DataGridColumn();
        datagridcolumn.columnName = "Price";
        datagridcolumn.headerText = "Prijs ";  
        /* font manipulatie */
        //datagridcolumn.setStyle("fontSize",8);
        datagridcolumn.width = 500;
        datagridcolumns.push(datagridcolumn);  
       
                datagridcolumn = new DataGridColumn();
        datagridcolumn.columnName = "Album";
        datagridcolumn.headerText = "Album";   
        /* font manipulatie */
        //datagridcolumn.setStyle("fontSize",8);
        datagridcolumn.width = 500;
        datagridcolumns.push(datagridcolumn);  
        datagrid.removeAllColumns();
        datagrid.columns = datagridcolumns;
       
        }

]]>
</mx:Script>
   <mx:Panel title="DataGrid Panel" marginTop="10" height="100%" width="100%">
   <mx:VBox width="100%">
      <mx:TextInput text="Always visible " height="20%" width="100%"></mx:TextInput>
          <mx:Panel id="SCROLLPANEL" title="let me have the Hscrollbar" hScrollPolicy="on" clipContent="true">
              <mx:DataGrid  id="datagrid" editable="true" height="100%" width="100%" columns="{datagridcolumns}"
                   hScrollPolicy="auto" >
            <mx:dataProvider>
                <mx:Array>
                    <mx:Object>
                        <Artist>Pavement</Artist>
                        <Price>9.99</Price>
                        <Album>Slanted and Enchanted</Album>
                    </mx:Object>
                    <mx:Object>
                        <Artist>Pavement</Artist>
                        <Price>9.99</Price>
                        <Album>Brighten The Corners</Album>
                    </mx:Object>
                </mx:Array>
            </mx:dataProvider>                 
        </mx:DataGrid>
               
      <mx:DataGrid  id="datagrid2" editable="true" height="100%" width="100%" columns="{datagridcolumns}"
                   hScrollPolicy="auto" >
            <mx:dataProvider>
                <mx:Array>
                    <mx:Object>
                        <Artist>Pavement</Artist>
                        <Price>9.99</Price>
                        <Album>Slanted and Enchanted</Album>
                    </mx:Object>
                    <mx:Object>
                        <Artist>Pavement</Artist>
                        <Price>9.99</Price>
                        <Album>Brighten The Corners</Album>
                    </mx:Object>
                </mx:Array>
            </mx:dataProvider>                 
        </mx:DataGrid>
                </mx:Panel>
               
                </mx:VBox>
    </mx:Panel>

</mx:Application>
       




Deze e-mail en alle gekoppelde bestanden zijn officiele documenten van het Gemeentelijk Havenbedrijf Antwerpen en kunnen vertrouwelijke of persoonlijke informatie bevatten. Gelieve de afzender onmiddellijk via e-mail of telefonisch te verwittigen als u deze e-mail per vergissing heeft ontvangen en verwijder vervolgens de e-mail zonder deze te lezen, te reproduceren, te verspreiden of te ontsluiten naar derden. Het Gemeentelijk Havenbedrijf Antwerpen is op geen enkele manier verantwoordelijk voor fouten of onnauwkeurigheden in de inhoud van deze e-mail. Het Gemeentelijk Havenbedrijf Antwerpen kan niet aansprakelijk gesteld worden voor directe of indirecte schade, verlies of ongemak veroorzaakt als gevolg van een onnauwkeurigheid of fout in deze e-mail.

English Translation: This e-mail and all attached files are official documents of Antwerp Port Authority and may contain confidential or personal information. If you have received this e-mail in error, you are asked to inform the sender by e-mail or telephone immediately, and to remove it from your system without reading or reproducing it or passing it on to other parties. Antwerp Port Authority is in no way responsible for any errors or inaccuracies in the contents of this e-mail, nor can it be held liable for any direct or indirect loss, damage or inconvenience arising from any such errors or inaccuracies. [GHA#Disclaimer]
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to