TextArea Scrollbar problem

I am starting to elarn flex and as a learning project I decided to make a simple RSS reader for one of my websites. I plan to release it as an Android app. The thing is I found a small problem with a textArea that has HTML text inside it. The text get's trimmed to the lenght that fits inside the text area. On the emulator, pressing the up/down arrow keys will make the textarea to render corectly just like it should...but on my tablet, there isn't a keyboard and even if it was it would not be OK to make this. Here is part of my code:
protected function newstext_showHandler(event:FlexEvent):void
     // TODO Auto-generated method stub
     var title:String = String(data[0]);
     var content:String = String(data[1]);
     this.title = title;
     StyleableTextField(newstext.textDisplay).htmlText = content;
data is an array passed from a previous screen. data[1] contains the HTML code.
The TextArea is added with these properties:
<s:TextArea id="newstext" x="0" y="0" width="100%" height="100%" editable="false" enabled="true" selectable="false" addedToStage="newstext_addedToStageHandler(event)" verticalScrollPolicy="on"/>
I also attached two images to show what I mean. In the first pic even if I try to scroll down no text is displayed. In the seccond, right after I press the up/down arrow keys a new line appears rendered and if I scroll down the entire article is shown.
http://imageshack.us/photo/my-images/195/beforearrowpressed.jpg/
http://imageshack.us/photo/my-images/849/afterarrowpressed.jpg/
If anyone has a fix for this please let me know.

May be you have to create a resizable text area.
http://idletogether.com/automatically-resize-texttextarea-based-on-content-autosize-in-fle x/
http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/

Similar Messages

  • Using Textarea Scrollbars

    Before I started using Dreamweaver, I used notepad. And I
    would use textarea scrollbars for excessive text.
    http://www.funky-chickens.com/tarea.shtml
    ...At the bottom, where it says Textarea allowing HTML. I usually
    use that on my previous websites. But using dreamweaver, when I
    install that snippet it creates problems and the tables stretch and
    screws up the whole site. How do I make that function work. I
    looked around and couldn't find that option
    Can anyone help me?
    A reference to how I use it:
    http://leyendarecords.com/biography.html
    ... Theres a website I made for someone. If you check out that
    page, you can see that I have scrollbars and text inside it. A
    friend made that template on Dreamweaver and I did everything on
    Notepad. Exactly how do I do that?

    That code is SO ANTIQUE it's unbelievable.
    <ilayer name="scroll1">
    <div id="scroll3"
    style="width:100;height:75;
    background-color:COLORHERE;
    overflow:auto">
    TEXT HTML TEXT HTML
    </textarea></div>The <ilayer> tag is not
    recognized by any browser than
    NN4x, and that browser is nearly extinct. In addition, they
    even omit the
    opening <textarea> tag and the closing </ilayer>
    tag, so in addition to
    being hopelessly antique, it's invalid too.
    > But using dreamweaver, when I install that snippet it
    > creates problems and the tables stretch and screws up
    the whole site. How
    > do I
    > make that function work.
    That's not surprising. DW doesn't know what to do with this
    markup.
    You could try just removing the <ilayer> tag -
    <div id="scroll3"
    style="width:100px;height:75px;background-color:COLORHERE;overflow:auto"><textarea>
    TEXT HTML TEXT HTML</textarea></div>
    but all form elements are required to be within an explicit
    <form>, so
    you'll have to add that -
    <div id="scroll3"
    style="width:100px;height:75px;background-color:COLORHERE;overflow:auto"><form>
    <textarea>TEXT HTML TEXT
    HTML</textarea></form></div>
    And then both the form tag and the textarea tag have some
    necessary
    attributes, so you'll have to add them too....
    I recommend you not use something like this, anyhow. There is
    a good
    discussion on this forum from just today about why it's a
    poor layout/design
    decision....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "streekd" <[email protected]> wrote in
    message
    news:[email protected]...
    > Before I started using Dreamweaver, I used notepad. And
    I would use
    > textarea
    > scrollbars for excessive text.
    http://www.funky-chickens.com/tarea.shtml
    > ...At
    > the bottom, where it says Textarea allowing HTML. I
    usually use that on my
    > previous websites. But using dreamweaver, when I install
    that snippet it
    > creates problems and the tables stretch and screws up
    the whole site. How
    > do I
    > make that function work. I looked around and couldn't
    find that option
    >
    > Can anyone help me?
    >
    > A reference to how I use it:
    http://leyendarecords.com/biography.html
    > Theres a website I made for someone. If you check out
    that page, you can
    > see
    > that I have scrollbars and text inside it. A friend made
    that template on
    > Dreamweaver and I did everything on Notepad. Exactly how
    do I do that?
    >

  • Scrollbar problem - any ideas?

    I know another scrollbar problem...ive read the posts but cant solve it. Anyone got any ideas?
    got a program called Map which draws a map (using paint()) of a web site. I can get it to work but often there are so many links they go off the page.I need a scrollbar.
    In main i set up a frame: JFrame frame=new JFrame("M");
    Then set up scrollbar: JScrollPane cf = new JScrollPane();
    cf.setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
    cf.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
    Then add scrollbar to frame: frame.getContentPane().add(cf);
    Then add Map() - my main prog: cf.add(new Map());
    (Map constructor calls repaint() - paint method draws to screen. main program extends JComponent)
    All i get is a blank (grey frame) with a scrollbar :) ...doesnt show Map - paint
    I can ignore scrollbar and use a container instead -
    Container c=frame.getContentPane()
    then set its layout : c.setLayout(new BorderLayout());
    and add Map() to it : add(new Mapper(),BorderLayout.CENTER);
    It works fine - but i need a scrollbar...
    Thanks for your time&help

    Hers the code for my main Mapper program (which is loaded first) and the Scan program(below).I know the structures all over the place+thats the problem. I would like a scrollbar. Also everytime i scan a new window opens, it would be good if only 1 ever opened.Ive been fiddling for days and am lost.Can anyone sort it out? I think the codes ok, just needs restructuring...
    The main Mapper program :
    package project.e;
    import javax.swing.*;import java.awt.*;import java.awt.geom.*;import java.awt.event.*;
    import java.io.*;import java.net.*;import java.lang.Math.*;import java.util.*;
    public class Mapper extends JComponent{
    static int w = 1000;
    static int h = 1000;
    static String [] Lnks = new String [5000]; //Lnks
    public Mapper()
    { repaint();}
    public void paint(Graphics g){
    Graphics2D g2D=(Graphics2D)g;
    Toolkit tk = Toolkit.getDefaultToolkit();
    Image img = tk.getImage("c:/windows/desktop/project/e/wirecube.gif"); //setup images
    Image rimg = tk.getImage("c:/windows/desktop/project/e/bwirecube.gif");
    int ww=(w/2);int hh=(h/2);
    g2D.setFont(new Font("Times New Roman", Font.PLAIN,12));
    g2D.setPaint(Color.cyan);
    g2D.drawString("Web Page Scanned : ",10,50); g2D.drawString(Scan.url,120,50);
    g2D.drawString("Total Links Found : ",10,100); g2D.drawString(String.valueOf(Scan.x),120,100);
    g2D.drawImage(rimg,ww-88,50,this); g2D.setFont(new Font("Times New Roman", Font.PLAIN,12));
    g2D.setPaint(Color.green);
    g2D.drawString(Scan.url,ww-88,50);
    int a=w/5;
    int up=0;
    int lx=0;
    g2D.translate(ww,hh);
    g2D.translate((-ww-a)+10,-300);
    for (int i=0;i<(Scan.x);i++){ //loop - drawing all (5 per line)
    if (lx==5){g2D.translate((-ww-ww),100);lx=0;} //every 5 times
    g2D.translate(a,0);
    g2D.drawImage(img,0,0,this); //img
    g2D.setFont(new Font("Times New Roman", Font.PLAIN,12));
    g2D.setPaint(Color.green);
    g2D.drawString(Lnks[up],ww-ww,hh-hh-10); //URL
    if (Scan.tl==true){g2D.drawString(Scan.IorE[up],ww-ww,hh-hh-25);}lx=lx+1;up=up+1;}}
    public static void main(final String [] args){          
    System.arraycopy(Scan.Links,0,Lnks,0,Scan.x);
    JFrame frame=new JFrame("Mapper"); //frame setup
    JMenu menu = new JMenu("Menu");
    JMenuItem scan = new JMenuItem("Scan");
    scan.setMnemonic(KeyEvent.VK_S);
    scan.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,Event.CTRL_MASK));
    scan.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){Scan.main(args);}});
    //call Scan
    JMenuItem downloadLink = new JMenuItem("download-Link");
    downloadLink.setMnemonic(KeyEvent.VK_L);
    downloadLink.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L,Event.CTRL_MASK));
    downloadLink.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){GetLink.main(args);}});
    JMenuItem downloadImage = new JMenuItem("download-Image");
    downloadImage.setMnemonic(KeyEvent.VK_I);
    downloadImage.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I,Event.CTRL_MASK));
    downloadImage.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){GetImage.main(args);}});
    JMenuItem Quit = new JMenuItem("Quit");
    Quit.setMnemonic(KeyEvent.VK_Q);
    Quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,Event.CTRL_MASK));
    Quit.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){System.exit(0);}});
    JMenuBar menuBar = new JMenuBar();
    menu.add(scan);
    menu.add(downloadLink);
    menu.add(downloadImage);
    menu.add(Quit);
    menuBar.add(menu);
    frame.setJMenuBar(menuBar);
    Container c = frame.getContentPane();
    c.setLayout(new BorderLayout());
    c.add(new Mapper());
    c.setBackground(new Color(0,0,0));
    frame.setJMenuBar(menuBar);
    frame.setBounds(0,0,w,h);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);}}
    Scan :
    package project.e;
    import java.awt.*;import java.awt.geom.*;import java.awt.event.*;import javax.swing.*;import javax.swing.text.*;import javax.swing.text.html.*;import java.io.*;import java.net.*;
    public class Scan{
    static String [] Links = new String[5000]; //array of links
    static String [] IorE = new String[5000]; //array - Internal or External
    static int x = 0; //length
    static String url = new String(); //url
    static String type = new String(); //link/image
    static boolean tl;
    static String l = new String("links");
    static String i = new String("images");
    public static void main(String [] args){
    Links = new String[5000]; //need to repeat ini. for rescanning
    IorE = new String[5000];
    x = 0;
    url = new String();
    type = new String();
    EditorKit kit = new HTMLEditorKit();
    Document doc = kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective",Boolean.TRUE);
    try{
    type = JOptionPane.showInputDialog(null,"Please enter file type to scan for - links / images ");
    url = JOptionPane.showInputDialog(null,"Please enter URL"); //get url (var.) to map - dialog box
    Reader rd = getReader(url); // Create a reader on the HTML content
    kit.read(rd, doc, 0); // Parse the HTML.
    ElementIterator it = new ElementIterator(doc);
    javax.swing.text.Element elem;
    while ((elem = it.next()) != null){  
    if (type.equals(l))
    tl =true;
    //int bol = url.indexOf(".com");
    SimpleAttributeSet s = (SimpleAttributeSet)
    elem.getAttributes().getAttribute(HTML.Tag.A);
    if (s != null)
    Links[x]=String.valueOf((s.getAttribute(HTML.Attribute.HREF)));
    String tmp = Links[x].substring(0,1);
    if (! tmp.equals("h")){
    if (! tmp.equals("/"))
    {Links[x]="/"+Links[x];}} //if string doesnt start with h or /                                    //then add a / to start
    if (Links[x].startsWith("/")){System.out.println("Internal Link");IorE[x]="Internal Link";} //if starts with / then internal
    else{
    if (Links[x].startsWith(url)){System.out.println("Internal Link");IorE[x]="Internal Link";} //else if starts with url then internal
    else{
    String tmp3 = url.substring(11); //else if contains url - (http://www.) eg. 123.ibm.com then internal
    int b=0;
    b=Links[x].indexOf(tmp3);
    if (b>0){System.out.println("Internal Link");IorE[x]=("Internal Link");}
    else{System.out.println("External Link");IorE[x]=("External Link");}}} //else must be external (doesnt start with / or url or contain middle bit of url)
    System.out.print("Link : ");
    System.out.print(x);
    System.out.println();
    System.out.println(Links[x]);
    System.out.println();
    x=x+1;
    if (type.equals(i))
    tl=false;
    if ( elem.getName().equals( HTML.Tag.IMG.toString() ) ){
    Links[x] = String.valueOf(elem.getAttributes().getAttribute( HTML.Attribute.SRC ));
    System.out.print("Image : ");
    System.out.print(x);
    System.out.println();
    System.out.println(Links[x]);
    System.out.println();
    x=x+1;}
    Mapper.main(args);
    }catch(Exception e){e.printStackTrace();}
    static Reader getReader(String u) throws IOException{
    if (u.startsWith("http:")){
    // Retrieve from Internet
    URLConnection con = new URL(u).openConnection();
    return new InputStreamReader(con.getInputStream());}else{
    // Retrieve from file.
    return new FileReader(u);
    Also got 2 extra - GetImage & GetLinks...they just go away and do there own stuff...no painting required so cool.The probelms is between Mapper+Scan...
    Thanks for your time&help
    Oly

  • Remove Html textarea scrollbar from jeditorpane

    Hi,
    I am using jeditorpane for display a content in my project,
    i am create html code and set to jeditorpane, but in my code i am using textarea for display large text,
    what my problem is in the textarea is not at all wrap and even small text also its show scrollbar,
    i want to remove the scrollbar and wrap properly, can any one give some idea is highly useful to solve my problem.
    my code is
            setContentType("text/html"_);
              HTMLEditorKit kit = new HTMLEditorKit();
              super.setEditorKit(kit);
              StyleSheet styleSheet = kit.getStyleSheet();
              styleSheet.addRule("textarea {style=border:4; overflow:auto; wrap:virtual}");
              styleSheet.addRule("body {color:#000; font-family:times; margin: 1px }");
              StringBuffer sb = new StringBuffer();
            // in this string buffer i am append all the html code
             setText( sb.toString() );Thanks in advance.

    This is the technique I use.
    1. Create 2 identical columns, one with the HTML and one without.
    2. Then conditionally display the columns, one to display in the web page and the other to display in the download. This can easily be done using the request value e.g.
    Condition Type: Request Is NOT Contained within Expression 1
    Expression1: CSV,PDF,RTF,XLS
    I hope that does the trick for you :)
    Simom

  • URGENT! - Browser scrollbar problem

    Hi every one!
    I have a flash site that is 660px wide but the height changes
    and can be to about 1800px.
    I want the browsers scrollbar to change depending on how much
    content is showing.
    I found this one
    http://hossgifford.com/downloads.htm,
    which seems to be very popular
    But I have problems with it. When I change the size it seems
    to reposition the whole
    SWFs Y coordinate. sometimes its so high up its outside the
    screen, and sometimes its
    100 or 200 pixels further down. I want it to snap to the top
    of the page. There is no documentation
    so Im not sure what Im doing wrong. Please give me a clue/ I
    will buy you a beer next time you are in
    London. I got to solve it (among other things) before the
    night is over.
    /P

    what you are asking sounds possible can you post your code on here so we can try to debug with you.
    Thanks
    Miguel

  • Cl_gui_alv_grid - scrollbar problem

    Hi all,
    I use the OO ALV grid.
    But when I display an itab in the ALV I have the following problem:
    The scrollbar does not scroll to all entries.
    This means the scrollbar (at the ALV grid) is at the end position but when I use the scroll wheel on the mouse there are more entries available.
    Is it a bug? Any ideas?
    regards

    Scrollbar was in wrong container

  • HTML input textarea causes problems

    Hi,
    I have a textarea on my form where the user will have the opportunity to enter a paragraph of text, where he can use HTML tags and whatever. But as soon as I enter html tags into this area, the formfileds coming after this textarea cannot sent their parameters to the next procedure. No html tags, everything works fine.
    Any idea?

    Hi Nilay,
    I don't think the textarea has anything to do with your problem. I just tried out and it works fine for me (at least with the italic and strong tags). Could you provide some more information on your case? (HTML source, the way you process the parameters, etc.)
    Peter

  • Scrollbar problem

    Hi am a new to flash and I have a problem. I have one swf file that contains whole website and I have just made a container file that has UI loader which is connected to the website. Everything works just fine without container but when i launch a website through a container i have problems with my scroll bar. It is not starting stop dragging function so when you press on a scrollbar box or on the button function of scrolling is always enabled and cant disable it (wherever you move mouse pointer scrollbar goes up and down). I was thinking maybe it has something to do with the following code. Maybe stage.addEventListener is not working because stage is different or something.By the way everything works fine when you test a movie with flash but the problems occurs when i try to use swf file or do any type of publishing. I would like to know is there a way to fix it or should I take a different preloader approach, maybe put it within the same movieclip where the whole website is. Thank You in advance.
    function dragScroller(e:MouseEvent):void
    stage.addEventListener(MouseEvent.MOUSE_UP, stopDragging); //on release starts stopDragging function which stops dragging
    function stopDragging(e:MouseEvent):void
    scrollBar_mc.scroller_mc.stopDrag();

    I think you can use one vertical scrollbar and one horizontal scrollbar.
    But I remember that "normally" you can use only one scrollbar for each data-block.
    Fabrizio

  • JTree scrollbar problem - can't scroll back to top when some nodes hidden

    I have a problem which I cannot resolve: I have a JTree which has had 88 rows added to it, and which then has 15 or so rows set to be not visible; when I then scroll to the bottom of the pane I am unable to scroll all the way back to the top using either the scroll button at the top of the bar or the mouse scroll wheel although I can drag the knob to get to the top; using the button or wheel, the scrolling stops somewhat short of the top; via testing I've found that the AdjustmentEvent is not fired when it reaches that point. Anyone seen this before and/or know a way around it?
    Thanks in advance,
    Mike

    MikeAuerbach267 wrote:
    It turns out that my problem was due to the fact that I am using my own TreeCellRenderer which makes invisible some nodes via user option but doesn't reload the tree; hence the confusion as to the scrollbar size. I now correctly reload after user option has changed rather than render nodes invisible and all is fine. Which reinforces Andrew's view in reply #1 that a 'vague waving about of hands' does not allow the forum members to help.

  • ScriptUI edittext scrollbar problem with Bridge CC Mac

    Hello,
    With Bridge CC for Mac, in the UI, the scrollbar which come with edittext and multiline option, is not active.
    The scrollbar on the right appears by typing text or ENTER, but not by scripting.
    Any idea? Thanks
    #target bridge
    var textgen = new Array();
    for (var r = 0; r < 15; r++) {
        textgen[r] = ("line "+r);
    var generatedtext = (textgen.join('\n')); 
    var win2 = new Window("dialog", undefined, [0,0,200,200], ); // UI
    with(win2){    
        win2.eText = add( "edittext", [5,45,140,175], generatedtext, {multiline: true, scrolling: true} ); // problem here with Bridge CC Mac
        win2.retour = add( "button", [150,5,195,32], "Close" );
    win2.retour.onClick = function() {win2.close();};
    win2.center();
    win2.show();

    Welcome to the wonderful world of bridge UI unsolved bugs!
    On Mac and PC bridge, CS6 or CC
    Sign the petition if we want to make some pressure on in here:
    http://gsfn.us/t/34ccy
    and here:
    http://gsfn.us/t/46vwa
    It time to say it:
    If (Bridge_Team.exists) {
         alert("Help on this old unsolved bug!")
    } else {
         alert("Cloud CC deserves our trust?");

  • TextField set to HTML, Scrollbar problem

    Hi,
    I have a chat box called 'chatbox' which needs to display
    lines in different colors. I've set 'render as HTML' and called the
    var property 'chat_html'. It displays things fine when I add lines
    with, for example, 'chat_html += "<font color =
    '#ff0000'>TEXT</font>'.
    The only problem is the vertical scrollbar doesn't update.
    I've noticed I can make it update by using 'chatbox.text += "" each
    time I add a html line, but this seems to set the colors to all one
    color, namely, 'chatbox's default color.
    Any help on this? How do I update the scrollbar without
    losing the different colors?
    Thanks - Gary.

    In the old way of things - what did change?
    Look at the WebAccess on the HTTP view - how long does it say that it
    has been up?
    rpm -qa novell-group What version
    What does the POA report?
    If this has all got squirrely rcgrpwise stop, rcapache2 stop and
    rctomcat5 stop (then restart them again in reverse order)
    T
    On Fri, 02 Sep 2011 19:26:02 GMT, taphillips
    <[email protected]> wrote:
    >
    >We have webaccess agent 8.0.2 running on OES SLES 10 sp3.
    >In the past few days webaccess users cannot send email when compose
    >view is set to html. They will be redirected back to the address bar to
    >input an address even though there is already and address listed. Some
    >will get the message "you must specify a recipient to send to" It will
    >send ok when set to plain text.
    >It happens across all operating ystems and different browsers and
    >versions I have tried so far.
    >I did find and old reference to this problem, but it had to do with an
    >older agent working against a newer post office.
    >This seemed to happen quite suddenly. We have had several power outages
    >in the last week or so but the server has not gone down.
    >Any ideas?
    >Thanks,
    >Tom

  • Slow scrollbar problem

    Hi guys, I have a problem of slow repaint with scrolling. I have a panel which contains a lot of graphical information. It's dynamically changes its size and may have a width up to 15000 - this is when it gets really slow when I scroll it.
    I was thinking that may be implementing my own ScrollBar will solve the problem, the ScrollBar which will not technically scroll the panel, but by analyzing it's position I will be able to paint only the corresponding part of graph on the screen, and won't have to repaint all of that invisible stuff beyond the screen.
    So I don't know, is it worth trying to do this? And if it is can anybody give me some hints on how to do it? If not, is there any other way to speed it up?
    Thank you, Paulina

    Feri, I'm sorry, I posted the previous message without making some other changes, so at the end the speed was actually improved!
    However, the scrolling worked fine when I applied the changes for the separate panel only. But in my main program I'll have at least 4 of these panels on the screen. I searched the forum and found a code which creates only one scrollbar that will handle the scrolling of all panels simulteniously. In this case, scrolling works fast, but the lines do not get drawn completely, only separate points are drawn. So instead of the line ____________ I see smth like this - - - - -
    Here is the code that I use to make one scrollbar to handle all panels:
    JScrollBar horscrollbar = new JScrollBar(JScrollBar.HORIZONTAL); //scrollbar that will be placed at the bottom of the main window
    JScrollPane[] jsps = new JScrollPane[4]; //creating 4 JScrollPane's , one for each graph
    //scrollbars in those JScrollPane's should not be visible
    int hn = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER;
    int vn = ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER;
    //making graphs the clients of JScrollPane
    jsps[0] = new JScrollPane(graph, vn, hn);     
    jsps[1] = new JScrollPane(graph2, vn, hn);     
    jsps[2] = new JScrollPane(graph3, vn, hn);     
    jsps[3] = new JScrollPane(graph4, vn, hn);
    //horscrollbar is registered to listen to this event
    public void adjustmentValueChanged(AdjustmentEvent e){
         JScrollBar source = (JScrollBar) e.getSource();
         if(source==horscrollbar){
    //transferring the value of horscrollbar to each invisible horizontal scrollbar in jsps[]
         int adj = e.getValue();     
         for (int x=0; x<4; x++)
              jsps[x].getHorizontalScrollBar().setValue(adj);
         }

  • Datagrid vertical scrollbar problem

    I wrote a search function for a datagrid component. The
    dataprovider is a ArrayCollection variable. If the item is found in
    the array, set the item to be selected in the datagrid. The problem
    is when the selected item is at bottom of the datagrid, the
    scrollbar doesn't refresh so I have to manually move the scrollbar
    to see the selected item. Here is part of my code:
    <mx:Script>
    <![CDATA[
    ......(populate accountData using dataservice)
    accountDS.fill(accountData);
    private function findAccountById(id:String):void
    var size:int = accountData.length - 1;
    for(var i:int = 0; i< size; i++) {
    var account:Object = accountData.getItemAt(i);
    if(account.accountNumber.search(id) != -1)
    dgAccount.selectedIndex = i;
    break;
    ]]>
    </mx:Script>
    <mx:ArrayCollection id="accountData"/>
    <mx:DataService id="accountDS"
    destination="accountlist"/>
    <mx:Panel >
    <mx:DataGrid id="dgAccounts" dataProvider="{accountData}"
    editable="false">
    <mx:columns>
    <mx:DataGridColumn dataField="accountNumber"/>
    <mx:DataGridColumn dataField="accountType" />
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>

    You need to look at the API for DataGrid. Particularly the
    property "verticalScrollPosition".
    The logic in your expectation that setting selectedIndex
    should update the scroll position is flawed. What if you selected
    an item with the mouse and then wanted to browse the other options?
    You would use the scroll bar for this. Your selection might
    disappear from the list but you would want it to stay selected.
    Thus the scroll position and the selected index are completely
    independent of one another.
    The point I am trying to make is this: you are required to
    set the verticalScrollPosition when you set selectedIndex if you
    want them to work in concert.

  • IPhoto scrollbar problems

    Is there anyway to fix this ?
    Here is a screenshot of my problem, www.bizarrelyneutral.com/files/iPhoto.png
    the scrollbar is weird, always like that, since getting iLife'08

    Try moving the slider at the bottom from one extreme to the other and see if that will clear it up. If not, close iPhoto, delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder and relaunch.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Jtable Horizontal ScrollBar problem

    Hi,
    I am having a Jtabel inside a JscrollPanel with horizontal and vertical scrollpane.
    My table model contains say 20 columns.But i am showing only 10 columns hiding the other 10.when i click on the table header i will show the rest of 10.so now the total columns are 20.but when i scroll thehorizantal bar to the see the other 10 coulmns the header for the latest 10 coulmns is not showing properly.
    Is there anybody to help me to sort out this problem.
    Thanks in advance.
    sree

    Hi,
    how ican saw Scrollbar with out Jtable.AUTO_RESIZR_OFF.That i already did.That not the actual problem.any how i solved this problem finally.It is something with TableHeaderRenderer..Any how thanks for ur help.
    sree

Maybe you are looking for