# Textgrid2 - double scrollbars

**URL:** <https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [March 2, 2006, 5:36pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243 "2006-03-02T17:36:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [March 2, 2006, 5:36pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243/1 "2006-03-02T17:36:04Z")

</div>

Hello,

I use textgrid2 in combination with csvcolumn.  
The size of columns included in the csvcolumn is unlimited. So I set hscrollbar=true in the textgrid. But if the width of this control exceeds the available width, not the textgrid’s scrollbar but the ie’s horizontal scrollbar is shown. This causes that the vertical scrollbar is also displayed.  
Finally, I can have 4 scrollbar: 2 horizontal and 2 verticals.  
Is the hscroll-property not supported by textgrid2 as the documentation told?

Greetz.

Extract - .xml

```auto
					<textgrid2 griddataprop="stationList" height="100%" width="100%"
						fixedcolumnsizes="true" selectprop="selected"
						singleselect="true" hscroll="true">
						<column textid="name" property="station" width="150"
							cuttextline="false"/>
						<csvcolumn titlesprop="gridTitles" valuesprop="values"
							widthsprop="gridWidths" cuttextline="false"/>
					</textgrid2>
```

Extract - adapter

```auto

            m_GridTitles = CSVManager.append(m_GridTitles, "someTitle");
            m_GridWidths = CSVManager.append(m_GridWidths, "50");
```

---

<div class="post-metadata">

**Author:** ![Serhat](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Serhat](https://techcommunity.softwareag.com/u/Serhat)\
**Post date:** [March 9, 2006, 6:03pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243/2 "2006-03-09T18:03:51Z")

</div>

Can you send whole page code ?

---

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [March 9, 2006, 6:28pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243/3 "2006-03-09T18:28:30Z")

</div>

xml:

```auto
	<pagebody takefullheight="true">
		<rowarea name="" height="100%" width="100%">
			<vdist height="5"/>
			<rowscrollarea height="100%" takefullheight="true"
				takefullwidth="false">
				<itr height="100%" takefullwidth="false">
					<textgrid2 griddataprop="stationList" height="100%" width="100%"
						fixedcolumnsizes="true" selectprop="selected"
						singleselect="true" hscroll="true">
						<column textid="name" property="station" width="150"
							cuttextline="false"/>
						<csvcolumn titlesprop="gridTitles" valuesprop="values"
							widthsprop="gridWidths" cuttextline="false"/>
					</textgrid2>
				</itr>
			</rowscrollarea>
			<vdist height="5"/>
		</rowarea>
	</pagebody>
```

Adapter:

```auto

...
        while(iterator.hasNext())
        {
            String something = (String) iterator.next();
            m_GridTitles = CSVManager.append(m_GridTitles, something);
            m_GridWidths = CSVManager.append(m_GridWidths, "50");
        }

        // column to 100%
        m_GridTitles = CSVManager.append(m_GridTitles, " ");
        m_GridWidths = CSVManager.append(m_GridWidths, "100%");
...
```

---

<div class="post-metadata">

**Author:** ![Serhat](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Serhat](https://techcommunity.softwareag.com/u/Serhat)\
**Post date:** [March 9, 2006, 7:14pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243/4 "2006-03-09T19:14:37Z")

</div>

Try to use this one :

```auto

<pagebody vscroll="hidden" hscroll="hidden" takefullheight="true">
        <itr takefullwidth="true" height="100%" fixlayout="true">
            <textgrid2 griddataprop="stationList" width="100%" height="100%" selectprop="selected" singleselect="true" hscroll="true" vscroll="auto" fixedcolumnsizes="false">
                <column name="name" property="station" width="150" cuttextline="false">
                </column>
                <csvcolumn titlesprop="gridTitles" valuesprop="values" widthsprop="gridWidths" cuttextline="false">
                </csvcolumn>
            </textgrid2>
        </itr>
    </pagebody>
```

And the enclosed paragraph from developer’s guide may help you :

If setting fixlayout to ““true”” then the control’s area is  
defined as area which is not sized dependent on its  
content (as normally done with table rendering). Instead  
the size is predefined from outside without letting the  
browser ““look”” into the content of the area. If the content  
is not fitting into the area then it is cut.  
You typically use this control if the content of the control’s  
area is flexibly sizable. E.g. if the content (e.g. a TEXTGRID  
control) is following the size of the container.  
When using vertical percentage based sizing you should  
pay attention to set the fixlayout-attribute to ““true”” as  
often as possible. - The browser as consequence will be  
much faster in doing its rendering because a screnn  
consists out of ““building blocks”” with simple to calculate  
sizes."

---

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [March 9, 2006, 7:36pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243/5 "2006-03-09T19:36:10Z")

</div>

😃  
Yes, now it works. Well, I did also try some combinations, but obviously I haven’t found the correct yet.

Thanks a lot, Serhat!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/textgrid2-double-scrollbars/57243/6 "2021-04-02T14:38:30Z")

</div>


