Horizontal Scrollbar on DataGrid

Hi,
I would like to create a DataGrid with many columns that the
width of DataGrid will larger than the screen. So I need a
horizontal scrollbar on DataGrid to let user move the grid
horizontally. However I could not found which proprity is used to
enable the horizontal scrollbar and the dafault of datagrid do not
have it. Could anyone can give me some advises?
Thanks a lot!
Wilson

By default the DataGrid will size all of the columns so they
fit into the horizontal space allocated to the DataGrid. If you
want to do what you suggest, then:
<mx:DataGrid horizontalScrollPolicy="on" ... >
will turn on the scrollbar and tell the DataGrid to relax its
size constraints.

Similar Messages

  • To disable the horizontal scrollbar and to create a next button to navigate

    To disable the horizontal scrollbar and to create a next button to navigate through the records. At present I create a JSF page and drag and drop my table view and then using the Tuning property I have limited the number of records to be shown. But I need to add a button and then code it to display the next few records. Can someone kindly suggest a suitable mechanism to get this accomplished.
    Edited by: 888970 on Oct 2, 2011 10:15 PM

    Hi Erp,
    At present these are the entries that I have in my JSPX page.
    I have a Table, Iterator and a Input List of Values. As per the scenario, I want a few rows to appear on the table for which I wanted to disable the horizontal scroll bar and then once I click on the list of values it must prompt me with the remaining page numbers.
    Earlier there are about 150 records in the table. I want to show them as 15 per page.
    For which I have added the Iterator and a LOV component code in my JSPX page.
    <af:iterator id="i1"
    value="#{bindings.NsEventDetailsView1.collectionModel}"
    var="row"
    binding="#{pageFlowScope.testPageBean.myIterator}"/>
    <af:inputListOfValues label="Label 1"
    popupTitle="Search and Result Dialog" id="ilov1"/>
    Then I created the bean class as per the example.
    Below is the bean class:
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import org.apache.myfaces.trinidad.component.UIXIterator;
    import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
    public class TestPagebean {
    public TestPagebean() {
    public void i1ov1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    private UIXIterator myiter;
    public void setI1(UIXIterator myiter) {
    this.myiter=myiter;
    public UIXIterator getmyiter() {
    this.myiter=myiter;
    public UIXIterator setmyiter() {
    return myiter;
    UIXIterator valueIterator = getmyiter();
    if (!valueChangeEvent.getNewValue().equals(valueChangeEvent.getOldValue())) {
    int newPage =
    Integer.parseInt(valueChangeEvent.getNewValue().toString());
    int pageStart = (newPage) * valueIterator.getRows();
    valueIterator.setFirst(pageStart);
    AdfFacesContext.getCurrentInstance().addPartialTarget(valueIterator);
    But i am getting errors in the bean class.
    1. Block expecting }
    2. public UIXIterator getmyiter() {
    this.myiter=myiter;
    Return Statement missing
    3. Block expecting {
    4. Type or variable 'valueChangeEvent' not found
    5. Method 'getNewValue' not found
    6. Method 'getOldValue' not found
    7. Method 'toString' not found
    Can you suggest a possible solution?

  • Apex 5.0, Horizontal scrollbar for Interactive Report  and Pivot Format

    Hi,
    i would like to know how to have an horizontal scrollbar for an interactive report (5.0) after making a pivot from the user interface; i have a lot of columns and without the pivot the horizontal scrollbar appears . After it doesn't appear.
    I tried with the Region Header <div style="overflow:auto;"> and Region Footer </div>  but without success.
    Regards
    Gianpaolo

    Hi gianpagi,
    gianpagi wrote:
    i would like to know how to have an horizontal scrollbar for an interactive report (5.0) after making a pivot from the user interface; i have a lot of columns and without the pivot the horizontal scrollbar appears . After it doesn't appear.
    I tried with the Region Header <div style="overflow:auto;"> and Region Footer </div>  but without success.
         Please mention the theme and template you are using for the Interactive Report.
         Can you re-produce the issue on apex.oracle.com and share the workspace credentials, so that can have closer look at the issue?
    Regards,
    Kiran

  • Forms 5 Tab Canvas & Horizontal Scrollbar

    We are trying to implement a tab canvas which will hold a multi-record data block. The difficulty is that we would like to display a lot of fields and there is no Horizontal Scrollbar easily available for the Tab Canvas.
    We are thinking about "simulating" a tab canvas by using stacked canvases. The stacked canvas allows us to have the scrollbar, but looses some of the look & feel of a tab canvas.
    Anyone try to do this in Forms 5? How about anyone try to place a stacked canvas on top of a tab canvas?

    We're using forms 6.0.8.8. Our standard practice is to never put items on a tab canvas, instead we put stacked canvas' on the tab canvas. Besides having canvas scroll bars, it also provides a basis to work around documented bugs for refreshing/resizing windows when returning from other forms/windows of different sizes etc.
    null

  • How to set the extra component to horizontal scrollbar position

    How to set the component to position of horizontal scrollbar , that position contain two component horizontal scrollbar and any component (JButton , JLabel ) like that.. Ms-Word scrollbar ,
    Like that bellow fig.
    <!--[if !mso]>
    <style>
    v\:* {behavior:url(#default#VML);}
    o\:* {behavior:url(#default#VML);}
    w\:* {behavior:url(#default#VML);}
    .shape {behavior:url(#default#VML);}
    </style>
    <![endif]--><!--[if gte mso 9]><xml>
    <w:WordDocument>
    <w:View>Normal</w:View>
    <w:Zoom>0</w:Zoom>
    <w:PunctuationKerning/>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
    <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
    <w:Compatibility>
    <w:BreakWrappedTables/>
    <w:SnapToGridInCell/>
    <w:WrapTextWithPunct/>
    <w:UseAsianBreakRules/>
    <w:DontGrowAutofit/>
    </w:Compatibility>
    <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
    </w:WordDocument>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
    </w:LatentStyles>
    </xml><![endif]-->
    <!--
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {page:Section1;}
    -->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->{font:'Times New Roman'}{size:12pt}<!--[if gte vml 1]><v:shapetype id="_x0000_t75"
    coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
    filled="f" stroked="f">
    <v:stroke joinstyle="miter"/>
    <v:formulas>
    <v:f eqn="if lineDrawn pixelLineWidth 0"/>
    <v:f eqn="sum @0 1 0"/>
    <v:f eqn="sum 0 0 @1"/>
    <v:f eqn="prod @2 1 2"/>
    <v:f eqn="prod @3 21600 pixelWidth"/>
    <v:f eqn="prod @3 21600 pixelHeight"/>
    <v:f eqn="sum @0 0 1"/>
    <v:f eqn="prod @6 1 2"/>
    <v:f eqn="prod @7 21600 pixelWidth"/>
    <v:f eqn="sum @8 21600 0"/>
    <v:f eqn="prod @7 21600 pixelHeight"/>
    <v:f eqn="sum @10 21600 0"/>
    </v:formulas>
    <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
    <o:lock v:ext="edit" aspectratio="t"/>
    </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:453pt;
    height:26.25pt'>
    <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\04\clip_image001.png"
    o:title=""/>
    </v:shape><![endif]--><!--[if !vml]--><img src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/04/clip_image002.jpg" alt="" width="485" height="27" /><!--[endif]-->{size}{font}
    How to design ?

    pradeep.rajadurai wrote:
    I want set the JTable as a background of jframe or jinternalframe , how it is possible One way that may work, you can always extract the image from a rendered JTable and then paint the same image into the JPanel that holds your components via it's paintComponent method, then added the JPanel to the app's contentPane.
    give me simple pgmIs English your second language? Because if so, please understand that this demand can be taken by some as rude.

  • Horizontal scrollbar for JComboBox - Not workable under Mac

    By referring to this thread Re: Horizontal scrollbar for JComboBox across multiple look and feel I try to provide horizontal scroll bar for JComboBox to my clients.
    private void adjustScrollBar() {
        //if (this.getItemCount() == 0) return;
        Object comp = this.getUI().getAccessibleChild(this, 0);
        if (!(comp instanceof JPopupMenu)) {
            return;
        JPopupMenu popup = (JPopupMenu) comp;
        // Works fine under Windows and Ubuntu Linux
        // However, in OSX 10.6.4
        // javax.swing.Box$Filler cannot be cast to javax.swing.JScrollPane
        JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
        scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
        scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    }The above code will cause ClassException under OSX 10.6.4. (Works fine for Windows and Linux)
    Any suggestion to resolve this problem. Sorry. I do not have a Mac machine. Hence, can't experiment out much with it.
    Thanks

    The following code works quite well for me.
        private void adjustScrollBar() {
            final int max_search = 8;
            // i < max_search is just a safe guard when getAccessibleChildrenCount
            // returns an arbitary large number. 8 is magic number
            JPopupMenu popup = null;
            for (int i = 0, count = this.getUI().getAccessibleChildrenCount(this); i < count && i < max_search; i++) {
                Object o = this.getUI().getAccessibleChild(this, i);
                if (o instanceof JPopupMenu) {
                    popup = (JPopupMenu)o;
                    break;
            if (popup == null) {
                return;
            JScrollPane scrollPane = null;
            for (int i = 0, count = popup.getComponentCount(); i < count && i < max_search; i++) {
                Component c = popup.getComponent(i);
                if (c instanceof JScrollPane) {
                    scrollPane = (JScrollPane)c;
                    break;
            if (scrollPane == null) {
                return;
            scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
            scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        }

  • Horizontal scrollbar for JComboBox

    Hi,
    I want to use Horizontal scrollbar for JComboBox which i have used as an editor for table column cell and the matter in drop down list is larger but the width of column of a table is relatively small
    Any suggetions!
    Thanks and regards,
    Nilesh

    Hi,
    I want to use Horizontal scrollbar for JComboBox which i have used as an editor for table column cell and the matter in drop down list is larger but the width of column of a table is relatively small
    Any suggetions!
    Thanks and regards,
    Nilesh

  • Problem with the HORIZONTAL Scrollbar

    Someone (I thanks him) has explain me how to have a horizontal scrollbar in a JTable (I use setHorizontalScrollBarPolicy(...)).
    So, now I have my Horizontal scrollbar but ONLY de bar and NOT the "button" in the bar. So, I am not able to scroll (and for a scrollbar it looks stupid). I have tried also setHorizontalScrollBar(...) but that didn't change anything.

    1. Try calling setEnabled(true); on the scrollbar
    2. Check that you need to scroll. If efffectively the knob (as the API docs call it) is larger than the scrollbar, it probably won't be shown.

  • ADF input text horizontal scrollbar?

    JDeveloper 11.1.2.1.0
    I'd like to create a user feedback messages area (read-only) using ADF that behaves in the same way as log windows do in JDeveloper. A multi-row af:inputtext is close to meeting the requirement except:
    - if a line is too long for the window then a horizontal scrollbar should appear but inputtext wraps the line instead
    - the window is not scrolled to the bottom by default
    Does anyone know of a way to implement these behaviours for an inputtext? Or is there a more suitable component?

    wrap=off forces inputtext to a single line which is no good. I want multi-line output, wrapping only if any line exceeds the window width.

  • An unpleasant horizontal scrollbar in Internet Explorer

    Hello,
    I have a problem with an unpleasant horizontal scrollbar in
    Internet Explorer. There is no problem in Fireworks, but in I.E. I
    can't remove him.
    Here is the website:
    http://www.wolf-design.nl/concept/tresbon
    > click on "Ons menu" to see the horizontal scrollbar.
    Is there anyone who 'knows how I can solve this problem?
    Idwd

    I have the answer fount on another Forum.
    The doctype was:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    and must be:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN" "
    http://www.w3.org/TR/html4/loose.dtd">
    Idwd

  • Displaying Horizontal Scrollbar in h:SelectOneListbox

    I am using myfaces1.1.4.
    I have a popup which will search for branches based on selected countries.So basically it will show branch name and adress in a h:selectOneListbox.I have vertical scroll bar with this, but i am trying to generate the horizontal scroll bar which is not a default with this component, i think i need to customize that component.I tried to play around with style attribute.But it is not working.
    This is the following code i am using:
    <h:selectOneListbox value="#{backingBean.branchID}"
    id="branchResults" size="5" required="false"
    style="WIDTH: 510px; HEIGHT: 80px; FONT-FAMILY: Courier New;">
    <f:selectItems id="branchNames"
    value="#{backingBean.branchMatches}" />
    I appreciate if you can look in to this.
    Thanks.

    Horizontal scrollbars are not attached to a block but to a canvas.
    if you need some spreadtable requierement, add a stacked canvas to your content canvas, and set the CANVAS item property of these items to this canvas.
    If the size of the stacked canvas is smaller to fit every items (and it probably should), you will see a horizontal scrollbar displayed at runtime.
    Francois

  • Horizontal Scrollbar in a JTextPane

    How can I specify whether or not there is a horizontal scrollbar for a JTextPane? The JTextPane is held within a JScrollPane, but if I try and do:
    scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    I just end up with a pointless scrollbar on the JScrollPane which doesn't do anything, because the text in the JTextPane still wraps onto the next line.
    Any ideas?
    Thank-you.

    Use this code to cancel the line wrapping of the text pane.
    JTextPane textPane = new JTextPane() {
        public boolean getScrollableTracksViewportWidth() {
            return false;
        public void setSize(Dimension d) {
            if (d.width < getParent().getSize().width)
                d.width = getParent().getSize().width;    
            super.setSize(d);
    };

  • Horizontal Scrollbar in Datablock

    Hello guys and good morning,
    I would like to ask you for a problem i have in displaying a horizontal scrollbar across a datablock. I have a datablock with 40 columns, from which the 9 are unabled because they are not changed or edited, so i want to scroll across the rest 31 columns. Any idea?
    Thanx a lot in advance,
    Best Regards,
    Bill Kepaptsoglou.

    Horizontal scrollbars are not attached to a block but to a canvas.
    if you need some spreadtable requierement, add a stacked canvas to your content canvas, and set the CANVAS item property of these items to this canvas.
    If the size of the stacked canvas is smaller to fit every items (and it probably should), you will see a horizontal scrollbar displayed at runtime.
    Francois

  • Horizontal scrollbar for plot legend

    Hello,
    The plots in my plot legend for a graph can have quite long names so it would be great having a horizontal scrollbar.
    Quote from here
    >>To add a scroll bar to a plot legend, right-click the plot legend and select Visible Items»Horizontal Scrollbar or Visible Items»Vertical Scrollbar from the shortcut menu.
    I can see the entry horizontal scrollbar, but it is always grayed out, what's wrong?
    Thanks a lot for your help!
    Cheers,
    Rico

    I think you are misinterpreting the use of the scrollbar.  If you have a lot of plots on your graph, then you can use the scrollabr to not show all the plots at once and this allows you to scroll through the list.  It does not allow you to make the plot legend smaller to hide long names and scoll across.
    So, if you resize the plot to be horizontal, then you can display the horizontal scrollbar:
    If you resize it vertically, then you can display the vertical scrollbar:
    Message Edited by Matthew Kelton on 05-09-2008 12:09 PM
    Attachments:
    Plot legend horizontal.png ‏2 KB
    Plot legend vertical.png ‏2 KB

  • Combo box menu calculation of popup size ignores horizontal scrollbar

    I have a JComboBox that I've setMaximumRowCount(20). However, sometimes the combo box has as few as 2 or 3 items in it. In those cases as you probably know, Swing automatically calculates how tall the popup should be, in this case 2 rows tall.
    However, this calculation ignores the horizontal scrollbar, which basically occupies a "row" itself. This means that if I have combo box with 2 items, the displayed popup will contain the first item, a horizontal scrollbar, and a vertical scrollbar (for scrolling down to the item that the horizontal scrollbar hides) . Is this a bug in Java? If so, are there any workarounds to this?
    I've looked in the bug report section using the terms "combobox horizontal scrollbar popup" and couldn't find anything
    thanks

    the very simple strategy to do is to call removeAllItems() method for the 2nd combox box and then insert the contents. this is because the validate() method is not repeatedly called and so the contents are not updated immediately.

Maybe you are looking for

  • Can't add album artwork in 10.6.3 (25)

    Hi.  Anyone having trouble adding artwork in 10.6.3?  I have some albums I've burned onto my disk (library sits on a seperate drive), and I've downloaded album artwork from the web but I can't add it in iTunes in the 'Get Info' option.  Everything is

  • Need a maximum date value using group by

    Create table student (dept number(10), dep_name varchar2(10),join_date date,years_attended number(10),end_date date); insert into student values (1,'I',to_date('3/7/1917','MM/DD/YYYY'),4,to_date('8/26/1987','MM/DD/YYYY')); insert into student values

  • ZAM 7. Collection Server unable to be started in ZAM Manager

    Hey all, Having problems getting my Domain Collection Server running in our ZAM Enterprise environment. Domain server has been rebuilt and by itself appears to be working fine. I have it communicating back to the central ZAM server and both my "Colle

  • New message symbol wont stop flashing

    just had my phone back from repair ( loose  screen) Now the new message envelope symbol in the top lefy hand corner of the screen wont stop flashing i have reloaded the latest software ( took an hour via the nokia website) what can i do or do i send

  • Alias for FQDN

    Hello expert, I am thinking to create Alias for Fully Qualified Domain Name(FQDN) for the BSP page for SRM EBP(bbpstart). I know there is external alias function from SICF. But that is for the subfix. I want to have alias replacing the fully qualied