5 Replies Latest reply on Aug 10, 2010 2:07 PM by AMIR820321548863

    scroller

    AMIR820321548863

      Hi

       

      I have build an application made up  of several data grids.

       

      because all pf the datagrid combine are larger than the screen i cannot see them all.

       

      I am trying to add a scroller in order to be able to see all, but it doesn't work.

      nothing happend, no complier or run time error.

       

      Doe anyone knows how to add a scroller to a an application made up of data grids?

       

      Thanks

        • 1. Re: scroller
          Deepanjan Das Level 3

          Hi,

          Can you share your mxml code?

          Where did you add the data grids to - application tag or a canvas?

           

          Warm Regards

          Deepanjan Das

          http://deepanjandas.wordpress.com/

          • 2. Re: scroller
            AMIR820321548863 Level 1

            Hi

             

            Here some of my code

             

             

             

             

            <s:Scroller width="3000" height="3000" x="10" y="0" chromeColor="#E2EF17">

             

             

            <s:Group height="3000" width="3000" x="0" y="0">

             

             

            <mx:DataGrid dataProvider="{xmlData}" x="0" y="5" >

             

             

            <mx:columns>

             

             

            <mx:DataGridColumn dataField="gad1" headerText="שם דובר"/>

             

             

            <mx:DataGridColumn dataField="male1" headerText="מין הדובר"/>

             

             

            <mx:DataGridColumn dataField="good" headerText="תקינות דובר"/>

             

             

            </mx:columns>

             

             

            </mx:DataGrid>

             

             

            <mx:DataGrid dataProvider="{xmlData13}" x="301" y="5" width="66" id="gad1">

             

             

            <mx:columns>

             

             

            <mx:DataGridColumn dataField="number" headerText="מס' מאזין" />

             

             

            </mx:columns>

             

             

            </mx:DataGrid>

             

            <mx:DataGrid dataProvider="{xmlDataa}" x="367" y="5" id="gad2">

             

            <mx:columns>

             

            <mx:DataGridColumn dataField="FirstName" headerText="שם פרטי"/>

             

            <mx:DataGridColumn dataField="LastName" headerText="שם משפחה"/>

             

            <mx:DataGridColumn dataField="Gender" headerText="מין"/>

             

            <mx:DataGridColumn dataField="DateOfbirth" headerText="גיל"/>

             

            </mx:columns>

             

            </mx:DataGrid>

             

             

            <mx:DataGrid dataProvider="{xmlData}" x="769" y="5" id="gad3">

             

            <mx:columns>

             

            <mx:DataGridColumn dataField="smart" headerText="חכם"/>

             

            <mx:DataGridColumn dataField="positive" headerText="חיובי"/>

             

            <mx:DataGridColumn dataField="male" headerText="גברי"/>

             

            <mx:DataGridColumn dataField="nervous" headerText="לחוץ"/>

             

            <mx:DataGridColumn dataField="decisive" headerText="החלטי"/>

             

            <mx:DataGridColumn dataField="strong" headerText="חזק"/>

             

            <mx:DataGridColumn dataField="active" headerText="פעיל"/>

             

            <mx:DataGridColumn dataField="healthy" headerText="בריא"/>

             

            <mx:DataGridColumn dataField="aggressive" headerText="אגרסיבי"/>

             

            <mx:DataGridColumn dataField="sociable" headerText="חברותי"/>

             

            <mx:DataGridColumn dataField="winner" headerText="מצליחן"/>

             

            <mx:DataGridColumn dataField="sexy" headerText="סקסי"/>

             

            <mx:DataGridColumn dataField="like" headerText="מוצא חן"/>

             

            <mx:DataGridColumn dataField="fix" headerText="שידוך"/>

             

            <mx:DataGridColumn dataField="job" headerText="עבודה"/>

             

            <mx:DataGridColumn dataField="buycar" headerText="מכונית"/>

             

            <mx:DataGridColumn dataField="help" headerText="עזרה"/>

             

            </mx:columns>

             

            </mx:DataGrid>

            </s:Group>

             

            </s:Scroller>

            • 3. Re: scroller
              Shongrunden Adobe Employee

              You shouldn't assign a size or position to the viewport Group of the Scroller... it gets sized automatically by the Scroller.  Also your Scroller size seems rather large, I believe you might mean to set it to a smaller size, here is an example of using 300x300 pixels:

              <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                             xmlns:s="library://ns.adobe.com/flex/spark"
                             xmlns:mx="library://ns.adobe.com/flex/mx">
                 
                  <s:Scroller width="300" height="300" x="10" y="0" chromeColor="#E2EF17">
                      <s:Group>
                          <mx:DataGrid  x="0" y="5" >
                              <mx:columns>
                                  <mx:DataGridColumn dataField="gad1" headerText="שם דובר"/>
                                  <mx:DataGridColumn dataField="male1" headerText="מין הדובר"/>
                                  <mx:DataGridColumn dataField="good" headerText="תקינות דובר"/>
                              </mx:columns>
                          </mx:DataGrid>
                         
                          <mx:DataGrid  x="301" y="5" width="66" id="gad1">
                              <mx:columns>
                                  <mx:DataGridColumn dataField="number" headerText="מס' מאזין" />
                              </mx:columns>
                          </mx:DataGrid>
                         
                          <mx:DataGrid  x="367" y="5" id="gad2">
                              <mx:columns>
                                  <mx:DataGridColumn dataField="FirstName" headerText="שם פרטי"/>
                                  <mx:DataGridColumn dataField="LastName" headerText="שם משפחה"/>
                                  <mx:DataGridColumn dataField="Gender" headerText="מין"/>
                                  <mx:DataGridColumn dataField="DateOfbirth" headerText="גיל"/>
                              </mx:columns>
                          </mx:DataGrid>
                         
                          <mx:DataGrid x="769" y="5" id="gad3">
                              <mx:columns>
                                  <mx:DataGridColumn dataField="smart" headerText="חכם"/>
                                  <mx:DataGridColumn dataField="positive" headerText="חיובי"/>
                                  <mx:DataGridColumn dataField="male" headerText="גברי"/>
                                  <mx:DataGridColumn dataField="nervous" headerText="לחוץ"/>
                                  <mx:DataGridColumn dataField="decisive" headerText="החלטי"/>
                                  <mx:DataGridColumn dataField="strong" headerText="חזק"/>
                                  <mx:DataGridColumn dataField="active" headerText="פעיל"/>
                                  <mx:DataGridColumn dataField="healthy" headerText="בריא"/>
                                  <mx:DataGridColumn dataField="aggressive" headerText="אגרסיבי"/>
                                  <mx:DataGridColumn dataField="sociable" headerText="חברותי"/>
                                  <mx:DataGridColumn dataField="winner" headerText="מצליחן"/>
                                  <mx:DataGridColumn dataField="sexy" headerText="סקסי"/>
                                  <mx:DataGridColumn dataField="like" headerText="מוצא חן"/>
                                  <mx:DataGridColumn dataField="fix" headerText="שידוך"/>
                                  <mx:DataGridColumn dataField="job" headerText="עבודה"/>
                                  <mx:DataGridColumn dataField="buycar" headerText="מכונית"/>
                                  <mx:DataGridColumn dataField="help" headerText="עזרה"/>
                              </mx:columns>
                          </mx:DataGrid>

               

                      </s:Group>
                  </s:Scroller>
                 
              </s:Application>

              • 4. Re: scroller
                AMIR820321548863 Level 1

                Hi

                 

                Thanks, now I can finally see it on the screen.

                How ever its not scolling...

                is there something I am missing here?

                 

                Thanks

                Amir

                • 5. Re: scroller
                  AMIR820321548863 Level 1

                  Hi

                   

                  Nevermind I have found my problem.

                  Its working fine.

                   

                  Thanks

                  Amir