Programati​cally advance Scroll bar in Listbox

Scrollbar has many multiple lines in it. Only one item at a time is
programatically selected during a repetitive process. I need to make
the scroll bar move to allow the selected item to always be at center
or is there a better way? As it is now the selected item will go below
the visible range as the loop increments and I cannt make the scroll
bar move programatically.
I am missing something simple I hope.
PS: LV-6.1
Thanks in advance

Use the property node "Top Row", this will make the input row to be
the first visible row.
Joe

Similar Messages

  • Multi Select Listbox - Horiz Scroll Bar available?

    I'm using the Standard - Multi Select Listbox and would like to see a horizontal scroll bar on it down at the bottom when the contents are too long to display in their entirety (and many of my items in the list start off the same with the distinguishing text at the end of the line).
    What's puzzling is that in the JSC IDE Design Tab, when I set some of the Default items to a long string, the control is shown on the Design Tab WITH a bottom, horizonal scroll bar! I was so hopeful! But when deployed the vertical scroll bar is there, but the Horiz scroll bar is gone :-(
    Has anyone gotten a horizontal scroll on a Multi Select Listbox to work in Creator??
    Suggestion to Creator Team: Please add a horizontal scroll bar OR at least allow a cursor on items in the list so that the user can manually move thru the line to see what it says.
    Thanks!

    Please help -
    These work arounds don't work for me. I'm using the latest Creator2 with all updates applied. Any chance of seeing a property for this soon?
    Work around 1:
    ===========================
    <div style="height: 72px; left: 144px; top: 192px; position: absolute; width: 288px; overflow: auto;">
    <ui:listbox binding="#{weblinkpl_page1.listbox1}" id="listbox1" items="#{SessionBean1.listOptions}"
    onChange="common_timeoutSubmitForm(this.form, 'tabSet1:weblink_tab2:layoutPanel2:listbox1');"/>
    </div>
    => Gives me listbox with no width at top left corner of page. Populating with very long file, changes the width of the box rather than creating a scroll bar.
    Work around 2:
    ======================
    <div style="overflow: auto;">
    <ui:listbox binding="#{weblinkpl_page1.listbox1}" id="listbox1" items="#{SessionBean1.listOptions}"
    onChange="common_timeoutSubmitForm(this.form, 'tabSet1:weblink_tab2:layoutPanel2:listbox1'); style="height: 72px; left: 144px; top: 192px; position: absolute; width: 288px; "/>
    </div>
    => Gives me good looking listbox but long filenames get truncated in display. No horizontal scroll bar.

  • Easy question - scroll bar position in listbox problem

    hello again
    this time my question is simple...
    is there a way to set the initial position of a vertical scroll bar of a listbox?
    sometimes - if i make more runnings - remain in memory the last position...and if the new listbox is smaller then the last one i see a white listbox and i think that something went wrong in my program
    Using LabVIEW 7.1
    Solved!
    Go to Solution.

    Hi gigi85,
    Okay in that case,Please create property node with Multiple lines property, and click on the blue square shown in the diagram and expand it downwards, Labview should automatically add these parameters. added screenshot for your reference.
    Let me know if u've any queries.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Screenshot_TopRow_PropertyNode.png ‏8 KB

  • Can horizontal scroll bar be removed?

    The listbox controls have horizontal scroll bar that can not be removed by property notes. Is there a way to change it to invisible? Also how do I change the controls from raised or recessed to flat? Thank you for your help.

    The only listbox with a horizontal scroll bar is the multicolumn listbox and it does have a property node to remove it or display it. In 8.5, the property is Visible Items>Horizontal Scrollbar Visible.
    There are modern controls, classic controls, and system controls on the palette. Pick the one you want or right click on an existing one and select 'Replace'. You can also right click and select Advanced>Customize.

  • How can i change the window scroll bar property at runtime...???

    hi all ,
    can i change the Window's (Forms window) "Show horizontal scroll bar property" at runtime, i mean programatically... Is there any property which i can set....??
    Thanx in advance
    Regard's
    Prasad

    There is no property there for your required task.
    Hassan

  • How can we remove the scroll bars from the table?

    Hi,
    I have a dynamic table. Currently the table appears with the scroll bars. But there is a requirement that the scroll bar should not appear and the table should stretch in the entire page. How can this be achieved.
    Thanks in advance
    Nita

    Thanks Mohammad for the reply.
    Was able to remove the scroll bars by using only the styleClass as AFStretchWidth. But there is a default partition in middle of the page still? Can i remove that too by any way.

  • How do i control 2 text boxes with 1 scroll bar? (CS4)

    I want to control 2 Dynamic Text boxs with the 1 scroll bar component? I want them to scroll simultaneously with the user only needing to use the one component. Thank you in advance for your help

    The textfields should have the same number of lines.  You can have the scrollbar (sb) assigned to one textfield (t1) and then have an event listener/handler for the scrollbar adjust the other textfield's (t2) scrollV property to match the first one's scrollV property:
    import fl.events.ScrollEvent;
    sb.addEventListener(ScrollEvent.SCROLL, adjustTs);
    function adjustTs(evt:ScrollEvent):void {
        t2.scrollV = t1.scrollV;

  • ALV top-of-page remove scroll bar

    Hi!
    In my ALV i have a header with some information and a logo. With the logo it creates a vertical scroll bar. I can't reduce the size of the logo because it as to be that size.
    So...i've been searching for some way to remove the scroll bar from the header, butt i didn't found anything that could help me.
    I'm using 'REUSE_ALV_GRID_DISPLAY' with i_callback_top_of_page   = 'TOP-OF-PAGE'. And in form top-of-page i use
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header
          i_logo             = 'LOGO'.
    to call the logo.
    Is there a way to remove or set the header to a fix size?
    Thanks in advance,
       RT

    Hi!
    In my ALV i have a header with some information and a logo. With the logo it creates a vertical scroll bar. I can't reduce the size of the logo because it as to be that size.
    So...i've been searching for some way to remove the scroll bar from the header, butt i didn't found anything that could help me.
    I'm using 'REUSE_ALV_GRID_DISPLAY' with i_callback_top_of_page   = 'TOP-OF-PAGE'. And in form top-of-page i use
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header
          i_logo             = 'LOGO'.
    to call the logo.
    Is there a way to remove or set the header to a fix size?
    Thanks in advance,
       RT

  • Horizontal Scroll bar Is not working iN REUSE_ALV_BLOCK_LIST

    Hi Experts,
    I am trying to create a reprot by using REUSE_ALV_BLOCK_LIST_APPEND, REUSE_ALV_BLOCK_LIST_DISPLAY.  I have 20 fields to display there, but here last two fields are coming in next row. But I need it it in one line with scroll bar. Cna anybody help me for that.
    Either I should use any other FM to display blocks ( 2 tables) or there is any OOps based FM for this with USER_COMMAND.
    Your help will be beneficial for me.
    Thanks a lot in advance.
    Edited by: Moni Bindal on Feb 10, 2009 7:32 AM

    Hello Moni,
    For increasing the length of columns
    try the below code while building the fieldcat,
    F_FIELDCAT-COL_POS = 1.
    F_FIELDCAT-FIELDNAME = 'EBELN'.
    F_FIELDCAT-TABNAME = 'IT_EKKO'.
    F_FIELDCAT-REF_FIELDNAME = 'EBELN'.
    F_FIELDCAT-REF_TABNAME = 'EKKO'.
    F_FIELDCAT-KEY = ''.
    F_FIELDCAT-EMPHASIZE = 'C510'.
    F_FIELDCAT-LOWERCASE = 'X'.
    F_FIELDCAT-SELTEXT_M = 'PURCHAGE DOCUMENT NUMBER'.
    FIELDCAT-OUTPUTLEN = 20.
    F_FIELDCAT-HOTSPOT = 'X'.
    F_FIELDCAT-DO_SUM = 'X'.
    APPEND I_FIELDCAT TO I_FIELDCAT.
    Important
    FIELDCAT-OUTPUTLEN = 20.
    if you are generating the field catalog using FM "REUSE_ALV_FIELDCATALOG_MERGE" then,
    read the field catalog table using the field names and modify the fieldlength
    read table F_FIELDCAT with key FIELDNAME = 'MAKTX'.
    F_FIELDCAT-OUTPUTLEN = 40.
    modify F_FIELDCAT index sy-tabix.
    OR
    as I suggested earlier, you can shift the block with highest width to top, so all other blocks will also be displayed properly without wrapping to next line.

  • Skillbuilders Modal Page (2.0.0) - Scroll bar issue

    Hi,
    I am using this plugin and I am having an issue.
    My requirement is to open a page from a link. I am able to do the same but I want the pop to be of specific width and height with scroll bar for height but not for width.
    Is there any way to do the same?
    As of now I can see that we can either turn both scroll bars on or both off.
    Please suggest that how can the same be achieved.
    Thanks in advance,
    Abhishek

    Abhishek,
    It's true, the one option controls both horizontal and vertical scrolling. This is due to the fact that the underlying plug-in uses one option for both.
    Have you tried just constraining the width of your modal page so that it's not as wide?
    As always, putting an example on apex.oracle.com and providing developer credentials would be helpful in helping you.
    Regards,
    Dan
    blog: http://DanielMcghan.us/
    work: http://SkillBuilders.com/APEX/

  • Remove/Hide scroll bars in scroll panes.

    Hi all,
    I am pretty new to action script. I am building a photo gallery and I am loading the thumbnails from an XML file into a scroll pane dynamically. As the scroll pane fills up, it gets wider to accomodate the thumbnails. There is one row, and eventually, I want to have the user be able to mouse left or right and have the scroll pane scroll, versus clicking on the bar or the left/right arrows. However, in order to accomplish this, I need the scroll bars to disappear!
    Is there anyway to either remove or hide both the x and y scroll bars on a scroll pane? My scroll pane is called: thumbPane.
    Thanks in advance!
    -Rob

    Hello friend,
                       first select scrollpane.Then open parameters panel (if dont know go to window > properties > paramiters ) turn to OFF HorizontalScrollPolicy  and verticalScrollPoliy then left and right scroll Bar will not display.
    THANKS.

  • Remove Scroll bars in a URL iView

    hi
    I am attaching more than one( three or four) URL iview to a page and while opening the page, I don't want the Scroll bars to appear on the page.
    how can this be done?
    and heard of isolation method.....but doubts whether it is available in EP 7
    Thanks in advance.

    I don't care about the iView functionalities...
    this I am doing as part of the spacing issue I am facing with the iViews.
    for URL iview I guess there is no isolation method.
    for pages it comes.
    but for some other iviews the isolation method is there.

  • How to get Auto scroll bar in a JSP?

    Hi Gurus,
    I have created a custom jsp page in a B2B application. How to get the auto scroll bar when page is exceeded than it can display?
    Is there any specific tag or div which is to be included to get this scroll bar?
    Thanks a lot in advance!!
    Regards,
    Lakshman.

    Hi Lakshman,
    You can include it in stylsheet and then use that class in your <body> or "div"  tag.
    the CSS command is
    overflow:auto;
    you can use like
    <body style="overflow: auto;"> or -- div style="overflow: auto;" 
    You can declare class in ".css" file
    #c1
    .c1
    <body id="c1>> or <div id="c1">
    <body class="c1>> or <div class="c1">
    You can use either "class" or "id" by adding it to "CSS" file and the use it to any JSP file or by direct aditing "Style" attirbute in tag.
    so when your content is longer then your screen browser will display scroll bar automatically.
    I hope this will help you.
    Thanks and Regards.
    eCommerce Developer
    Edited by: Ecommerce Developer on Jul 9, 2009 5:58 PM
    Edited by: Ecommerce Developer on Jul 9, 2009 5:59 PM

  • JTextArea w/Scroll bar wont scroll AND code drops through if statements

    Hi, I'm still having trouble with the text area in the following code. When you run the code, you get the top arrow on the scroll bar, but the bottom is cut off. Also, a big problem is that no matter what choice is selected from the combo box, the code drops through to the last available value each time. Someone on the forums suggested using an array list for the values in the combo box, but I have not been able to figure out how to do that. A quick example would be apprciated.
    Thank you in advance for any help
    //Import required libraries
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    import java.text.*;
    import java.math.*;
    import java.util.*;
    //Create the class
    public class Week3Assignment407B extends JFrame implements ActionListener
         //Panels used in container
         private JPanel jPanelRateAndTermSelection;         
         //Variables for Menu items
         private JMenuBar menuBar;    
         private JMenuItem exitMenuItem; 
         private JMenu fileMenu; 
         //Variables for user instruction and Entry       
         private JLabel jLabelPrincipal;   
         private JPanel jPanelEnterPrincipal;  
         private JLabel jLabelChooseRateAndTerm; 
         private JTextField jTextFieldMortgageAmt;
         //Variables for combo box and buttons
         private JComboBox TermAndRate;
         private JButton buttonCompute;
         private JButton buttonNew; 
         private JButton buttonClose;
         //Variables display output
         private JPanel jPanelPaymentOutput;
         private JLabel jLabelPaymentOutput;
         private JPanel jPanelErrorOutput;
         private JLabel jLabelErrorOutput;  
         private JPanel jPanelAmoritizationSchedule;
         private JTextArea jTextAreaAmoritization;
         // Constructor 
         public Week3Assignment407B() {            
              super("Mortgage Application");      
               initComponents();      
         // create a method that will initialize the main frame for the GUI
          private void initComponents()
              setSize(700,400);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      
              Container pane = getContentPane();
              GridLayout grid = new GridLayout(15, 1);
              pane.setLayout(grid);       
              //declare all of the panels that will go inside the main frame
              // Set up the menu Bar
              menuBar = new JMenuBar();
              fileMenu = new JMenu();
              fileMenu.setText("File");        
              exitMenuItem = new JMenuItem(); 
               exitMenuItem.setText("Exit");
              fileMenu.add(exitMenuItem); 
              menuBar.add(fileMenu);       
              pane.add(menuBar);
              //*******************TOP PANEL ENTER PRINCIPAL*****************************//
              // Create a label that will advise user to enter a principle amount
              jPanelEnterPrincipal = new JPanel(); 
              jLabelPrincipal = new JLabel("Amt to borrow in whole numbers");
              jTextFieldMortgageAmt = new JTextField(10);
              GridLayout Principal = new GridLayout(1,2);
              jPanelEnterPrincipal.setLayout(Principal); 
                jPanelEnterPrincipal.add(jLabelPrincipal);
              jPanelEnterPrincipal.add(jTextFieldMortgageAmt);
              pane.add(jPanelEnterPrincipal);
              //****************MIDDLE PANEL CHOOSE INTEREST RATE AND TERM*****************//
              // Create a label that will advise user to choose an Int rate and term combination
              // from the combo box
              jPanelRateAndTermSelection = new JPanel();
              jLabelChooseRateAndTerm = new JLabel("Choose the Rate and Term");
              buttonCompute = new JButton("Compute Mortgage");
              buttonNew = new JButton("New Mortgage");
              buttonClose = new JButton("Close");
              GridLayout RateAndTerm = new GridLayout(1,5);
              //FlowLayout RateAndTerm = new FlowLayout(FlowLayout.LEFT);
              jPanelRateAndTermSelection.setLayout(RateAndTerm);
              jPanelRateAndTermSelection.add(jLabelChooseRateAndTerm);
              TermAndRate = new JComboBox();
              jPanelRateAndTermSelection.add(TermAndRate);
              TermAndRate.addItem("7 years at 5.35%");
              TermAndRate.addItem("15 years at 5.5%");
              TermAndRate.addItem("30 years at 5.75%");
              jPanelRateAndTermSelection.add(buttonCompute);
              jPanelRateAndTermSelection.add(buttonNew);
              jPanelRateAndTermSelection.add(buttonClose);
              pane.add(jPanelRateAndTermSelection);
              //**************BOTTOM PANEL TEXT AREA FOR AMORITIZATION SCHEDULE***************//
              jPanelAmoritizationSchedule = new JPanel();
              jTextAreaAmoritization = new JTextArea(26,50);
              // add scroll pane to output text area
                   JScrollPane scrollBar = new JScrollPane(jTextAreaAmoritization, 
                   JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                     JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              jPanelAmoritizationSchedule.add(scrollBar);
                pane.add(jPanelAmoritizationSchedule);
              //***************ADD THE ACTION LISTENERS TO THE GUI COMPONENTS*****************//
              // Add ActionListener to the buttons and menu item
              exitMenuItem.addActionListener(this);
              buttonCompute.addActionListener(this);         
              buttonNew.addActionListener(this);
              buttonClose.addActionListener(this);
              TermAndRate.addActionListener(this);
              jTextFieldMortgageAmt.addActionListener(this);
              //*************** Set up the Error output area*****************//
              jPanelErrorOutput = new JPanel();
              jLabelErrorOutput = new JLabel();
              FlowLayout error = new FlowLayout();
              jPanelErrorOutput.setLayout(error);
              pane.add(jLabelErrorOutput);
              setContentPane(pane);
              pack();
              setVisible(true);
         //Display error messages
         private void OutputError(String ErrorMsg){
              jLabelErrorOutput.setText(ErrorMsg);
              jPanelErrorOutput.setVisible(true);
         //create a method that will clear all fields when the New Mortgage button is chosen
         private void clearFields()
              jTextAreaAmoritization.setText("");
              jTextFieldMortgageAmt.setText("");
         //**************CREATE THE CLASS THAT ACTUALLY DOES SOMETHING WITH THE EVENT*****//
         //This is the section that receives the action source and directs what to do with it
         public void actionPerformed(ActionEvent e)
              Object source = e.getSource();
              String ErrorMsg;
              double principal;
              double IntRate;
              int Term;
              double monthlypymt;
              double TermInYears = 0 ;
              if(source == buttonClose)
                   System.exit(0);
              if (source == exitMenuItem) {      
                       System.exit(0);
              if (source == buttonNew)
                   clearFields();
              if (source == buttonCompute)
                   //Make sure the user entered valid numbers
                   try
                        principal = Double.parseDouble(jTextFieldMortgageAmt.getText());
                   catch(NumberFormatException nfe)
                        ErrorMsg = (" You Entered an invalid Mortgage amount"
                                  + " Please try again. Please do not use commas or decimals");
                        jTextAreaAmoritization.setText(ErrorMsg);
                   principal = Double.parseDouble(jTextFieldMortgageAmt.getText());
                    if (TermAndRate.getSelectedItem() == "7 years at 5.35%") ;
                        Term = 7;
                        IntRate = 5.35;
                    if (TermAndRate.getSelectedItem()  == "15 years at 5.5%") ;
                        Term = 15;
                        IntRate = 5.5;
                    if (TermAndRate.getSelectedItem() == "30 years at 5.75%") ;
                        Term = 30;
                        IntRate = 5.75;
                   //Variables have been checked for valid input, now calculate the monthly payment
                   NumberFormat formatter = new DecimalFormat ("$###,###.00");
                   double intdecimal = intdecimal = IntRate/(12 * 100);
                   int months = Term * 12;
                   double monthlypayment = principal *(intdecimal / (1- Math.pow((1 + intdecimal),-months)));
                   //Display the Amoritization schedule
                   jTextAreaAmoritization.setText(" Loan amount of " + formatter.format(principal)
                                                    + "\n"
                                                    + " Interest Rate is " +  IntRate + "%"
                                            + "\n"
                                            + " Term in Years "  + Term
                                            + " Monthly payment "+  formatter.format(monthlypayment)
                                            + "\n"
                                            + "  Amoritization is as follows:  "
                                            + "------------------------------------------------------------------------");
         public Insets getInsets()
              Insets around = new Insets(35,20,20,35);
              return around;
         //Main program     
         public static void main(String[]args) { 
              Week3Assignment407B frame = new Week3Assignment407B(); 
       }

    here's your initComponents with a couple of changes, the problem was the Gridlayout(15,1)
    also, the scrollpane needed a setPreferredSize()
      private void initComponents()
        setSize(700,400);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Container pane = getContentPane();
        JPanel pane = new JPanel();
        //GridLayout grid = new GridLayout(15, 1);
        GridLayout grid = new GridLayout(2, 1);
        pane.setLayout(grid);
        menuBar = new JMenuBar();
        fileMenu = new JMenu();
        fileMenu.setText("File");
        exitMenuItem = new JMenuItem();
        exitMenuItem.setText("Exit");
        fileMenu.add(exitMenuItem);
        menuBar.add(fileMenu);
        //pane.add(menuBar);
        setJMenuBar(menuBar);
        jPanelEnterPrincipal = new JPanel();
        jLabelPrincipal = new JLabel("Amt to borrow in whole numbers");
        jTextFieldMortgageAmt = new JTextField(10);
        GridLayout Principal = new GridLayout(1,2);
        jPanelEnterPrincipal.setLayout(Principal);
          jPanelEnterPrincipal.add(jLabelPrincipal);
        jPanelEnterPrincipal.add(jTextFieldMortgageAmt);
        pane.add(jPanelEnterPrincipal);
        jPanelRateAndTermSelection = new JPanel();
        jLabelChooseRateAndTerm = new JLabel("Choose the Rate and Term");
        buttonCompute = new JButton("Compute Mortgage");
        buttonNew = new JButton("New Mortgage");
        buttonClose = new JButton("Close");
        GridLayout RateAndTerm = new GridLayout(1,5);
        jPanelRateAndTermSelection.setLayout(RateAndTerm);
        jPanelRateAndTermSelection.add(jLabelChooseRateAndTerm);
        TermAndRate = new JComboBox();
        jPanelRateAndTermSelection.add(TermAndRate);
        TermAndRate.addItem("7 years at 5.35%");
        TermAndRate.addItem("15 years at 5.5%");
        TermAndRate.addItem("30 years at 5.75%");
        jPanelRateAndTermSelection.add(buttonCompute);
        jPanelRateAndTermSelection.add(buttonNew);
        jPanelRateAndTermSelection.add(buttonClose);
        pane.add(jPanelRateAndTermSelection);
        jPanelAmoritizationSchedule = new JPanel();
        jTextAreaAmoritization = new JTextArea(26,50);
        JScrollPane scrollBar = new JScrollPane(jTextAreaAmoritization,
          JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollBar.setPreferredSize(new Dimension(500,100));//<------------------------
        jPanelAmoritizationSchedule.add(scrollBar);
        getContentPane().add(pane,BorderLayout.NORTH);
        getContentPane().add(jPanelAmoritizationSchedule,BorderLayout.CENTER);
        exitMenuItem.addActionListener(this);
        buttonCompute.addActionListener(this);
        buttonNew.addActionListener(this);
        buttonClose.addActionListener(this);
        TermAndRate.addActionListener(this);
        jTextFieldMortgageAmt.addActionListener(this);
        jPanelErrorOutput = new JPanel();
        jLabelErrorOutput = new JLabel();
        FlowLayout error = new FlowLayout();
        jPanelErrorOutput.setLayout(error);
        //pane.add(jLabelErrorOutput);not worrying about this one
        //setContentPane(pane);
        pack();
        setVisible(true);
      }instead of
    if (TermAndRate.getSelectedItem() == "7 years at 5.35%") ;
    Term = 7;
    IntRate = 5.35;
    you would be better off setting up arrays
    int[] term = {7,15,30};
    double[] rate = {5.35,5.50,5.75};
    then using getSelectedIndex()
    int loan = TermAndRate.getSelectedIndex()
    Term = term[loan];
    IntRate = rate[loan];

  • How to make a scroll Bar with buttons

    Hi all,
    I am using Flash cs6 on an iMAC running 10.7.2
    I would like to know if anyone could please point me to a tutorial, showing "how to create a scroll bar with buttons". I am having a heck of a time finding a tutorial.
    Many thanks in advance.
    regards,
    DH

    http://learnola.com/2008/10/27/flash-tutorial-create-a-custom-scrollbar-with-actionscript/

Maybe you are looking for