I'm not familiar with Flex 1.5 but from the differnce of syntax i
assume thats what your using. Either way you want something similar to
the following to do what your looking for.

<mx:Panel id="mainPanel" title="DataGrid Panel" height="100%"
width="100%">
<mx:VBox width="100%">
<mx:TextInput text="Always visible " height="20%" width="100%"/>
<mx:Panel id="SCROLLPANEL" width="{mainPanel.width-20}" title="let me
have the Hscrollbar" horizontalScrollPolicy="on" clipContent="true">
<mx:DataGrid id="datagrid" editable="true" height="100%"
dataProvider="{DummyArrayCollection}"/>
<mx:DataGrid id="datagrid2" editable="true" height="100%"
dataProvider="{DummyArrayCollection}"/>
</mx:Panel>
</mx:VBox>
</mx:Panel>

Fixed width for the scroll panel instead of a %.
Turn of scrolling for the datagrids.
At this point you can even change the scrollpanel to default scroll
policy if the data grids are never actually too wide.

--- In [email protected], "Tommy Mestdagh"
<[EMAIL PROTECTED]> wrote:
>
> 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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to