Geting a SCROLL BAR to scroll

hi i have create this application using JBuilder6 and it has a JTextArea within a JPanel, but i cannot get the text to scroll.
Any comments welcomed.
d code:
package com.borland.samples.gary;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
* <p>Author: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
public class Frame1 extends JFrame {
  JPanel contentPane;
  JButton jButton1 = new JButton();
  FlowLayout flowLayout1 = new FlowLayout();
  JButton jButton2 = new JButton();
  JButton jButton3 = new JButton();
  JButton jButton4 = new JButton();
  JScrollPane jScrollPane1 = new JScrollPane();
  JTextArea jTextArea2 = new JTextArea();
  Border border1;
  //Construct the frame
  public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
      jbInit();
    catch(Exception e) {
      e.printStackTrace();
  //Component initialization
  private void jbInit() throws Exception  {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    border1 = BorderFactory.createEmptyBorder();
    jButton1.setText("jButton1");
    contentPane.setLayout(flowLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    jButton2.setText("jButton2");
    jButton3.setText("jButton3");
    jButton4.setText("jButton4");
    jTextArea2.setPreferredSize(new Dimension(250, 170));
    jTextArea2.setMargin(new Insets(3, 3, 3, 3));
    jTextArea2.setLineWrap(true);
    jTextArea2.setWrapStyleWord(true);
    jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jScrollPane1.setViewportBorder(border1);
    jScrollPane1.setNextFocusableComponent(jTextArea2);
    jScrollPane1.addMouseListener(new java.awt.event.MouseAdapter() {
      public void mousePressed(MouseEvent e) {
        jScrollPane1_mousePressed(e);
    contentPane.add(jButton1, null);
    contentPane.add(jButton2, null);
    contentPane.add(jButton3, null);
    contentPane.add(jButton4, null);
    contentPane.add(jScrollPane1, null);
    jScrollPane1.getViewport().add(jTextArea2, null);
  //Overridden so we can exit when window is closed
  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
  void jScrollPane1_mousePressed(MouseEvent e) {
    jTextArea2.append("mouussee pressed");
}cheers Brendan2003

Change jTextArea2.setPreferredSize() to jScrollPane1.setPreferredSize(). As it stands now, you are telling the text area that you don't want it to change size, if at all possible, so it doesn't.

Similar Messages

  • Different Scroll bars in one file

    I've manually customized the look and feel of the scroll bars for scroll pane component and it works fine. I've two different files that have different visual styles for scroll bars. Now I want to merge these two files meaning I want to have one file with two different styles of scrollbars co-existing. I can resolve the naming conflicts but both of the them are using same asset names and action scripts (I think in the class definition).
    So basically my question if how can I have two different scroll bars implemented in one file?
    Many thanks

    You can make the clip that you want to play at 2 fps seem
    that way by just making it longer. Alternately, you could use a
    timed tween.

  • 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.

  • The status bar is pushed up at about 3/4 of the screen, so I can view onlu firefox at about 1/4, good thing there is a scroll bar, but below the status bar is white display? can u please help me, I want to drag down the status bar so I can have a full vi

    The status bar is pushed up at about 3/4 of the screen, so I can view only Firefox at about 1/4, good thing there is a scroll bar, but below the status bar is white display? can u please help me, I want to drag down the status bar so I can have a full view
    == This happened ==
    Every time Firefox opened

    Your code is absolutely unreadable - even if someone was willing to
    help, it's simply impossible. I do give you a few tips, though: If you
    understand your code (i.e. if it really is YOUR code), you should be
    able to realize that your minimum and maximum never get set (thus they
    are both 0) and your exam 3 is set with the wrong value. SEE where
    those should get set and figure out why they're not. Chances are you
    are doing something to them that makes one 'if' fail or you just
    erroneously assign a wrong variable!

  • At times when dragging the vertical scroll bar my computer screen oscillates up and down for some time before going blank or not responding to any clicks requiring a forced system restart. What is wrong?

    Hi,
    Suddenly while working with Firefox if I happen to drag the vertical scroll bar, a very abnormal behavior occurs. My screen dances up and down for a short time before either going black or getting restored but with no clicks working. The only way to resume is to force a restart of the system.
    Any help would be deeply appreciated.
    Thanks and Regards
    Deepak

    That didn't work. On trying to install a new driver I got the error the graphics driver could not find compatible graphics hardware. Is there anything else that can be done to at least prevent the hanging of the computer even if it means less features from Firefox being available?

  • Upgraded to snow leopard, now safari scrolls a page down when space bar is hit and sometimes crashes.  Any ideas for a fix?

    I just upgraded to the new snow leopard, now my Safari is acting loopy.  At times, the page will scroll down when I hit the space bar.  As I type this discussion the screen isn't paging down, but if I go to the tab where I have facebook loaded and hit the space bar, it acts as a page down key.  I've had safari crash about 5 times tonight for no apparent reason.  The delete key sometimes will act as a page back key.  I really have no idea whats going on. 
    I've had keyboards go wacko on me before due to something being spilled on them or a wireless problem, but this keyboard is a wired keyboard and nothing was spilled on it.  It's rather new and I'm quite certain it's not a keyboard issue. 
    No settings have been changed on the computer.  The only thing different today from yesterday, is the fact that I upgraded to snow leopard.
    Help would be pretty sweet.   
    Thanks,
    Jason

    I just upgraded to the new snow leopard, now my Safari is acting loopy.  At times, the page will scroll down when I hit the space bar.  As I type this discussion the screen isn't paging down, but if I go to the tab where I have facebook loaded and hit the space bar, it acts as a page down key.  I've had safari crash about 5 times tonight for no apparent reason.  The delete key sometimes will act as a page back key.  I really have no idea whats going on. 
    I've had keyboards go wacko on me before due to something being spilled on them or a wireless problem, but this keyboard is a wired keyboard and nothing was spilled on it.  It's rather new and I'm quite certain it's not a keyboard issue. 
    No settings have been changed on the computer.  The only thing different today from yesterday, is the fact that I upgraded to snow leopard.
    Help would be pretty sweet.   
    Thanks,
    Jason

  • I would like to know it it's possible to change the scroll bar from the right part of the firefox browser, to the left part and, if it's possible, how can it be done. Thank you!

    The scroll bar (the one used to scroll up and down any kind of website), that is normally in the right part of the firefox browser, would be of much help to me if it could sometimes be moved to the left part of the browser. Is this possible? How can it be done? Can anybody tell me the exact steps to take in order to do this (if it is possible of course)? This would be helpfull to me, since I think that the firefox scroll bar is overlaping the scroll part of the facebook chat sidebar, since I just can see a few people on this facebook chat sidebar and I can´t scroll along it, as I could a while ago. So my guess is that the firefox scroll bar is covering the other. In order to solve it in a simpler way, I guessed that if the firefox scroll bar could be moved to the left side of the browser, this problem could be solved. So, can anybody help me?

    http://kb.mozillazine.org/layout.scrollbar.side
    Type '''about:config''' in Location (address) bar
    filter for '''layout.scrollbar.side'''
    Right-click the Preference and Modify it to '''3'''
    You may need to reload any pages open to have scrollbar move to left after Preference change.

  • Help with code for inserting horizontal scroll bar in photo gallery in Business Catalyst site?

    Hi,
    I am using Business Catalyst and Dreamweaver to create a trial site.
    I am not sure if this is the correct forum to post this request but anyway I have inserted a photo gallery module at the bottom of the sidebar in the homepage of my test site.
    Can anyone advise on whether jquery or any other code can be inserted into the page or module code that will replace the "next" hyperlink below the first 4 photos with a horizontal scroll bar at bottom of the gallery so users can just scroll through all 12 images ?
    Kind Regards, Matt.
    http://craftime-bs6.businesscatalyst.com/

    Alyssa,
    Have you tried putting this rule back as it was originally:
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto; /*was 9px*/
        color: #EF9CCF;
        background-color: #FFF;
    That is, changing your 9px back to auto.
    And giving  us a link (as you did) is much better than printing out the code for us! Thanks!
    Beth

  • My firefox browser window will not stay in full screen mode, it keeps reducing itself so I can't use the scroll down button on the side, so I have to constantly minimize and maximize to get to the scroll bar, How can I stop this?

    Like I said it happens every few minutes... It is annoying when you are on the internet for more than a few minutes because you constantly have to either minimize it or reduce the screen manually by hitting the button and then maximize it again to get the scroll bar to be in view to use it.

    Delete the localstore.rdf file at the following location:
    C:\Users\'''USERNAME'''\AppData\Roaming\Mozilla\Firefox\Profiles\'''PROFILE NAME'''
    I did this and it fixed it for several days, but it broke again eventually.

  • How to activate the Vertival Scroll Bar to Table control

    Hi All,
    I Have created a Module pool table control(Wizard) with Input control,where user can enter the values in the screen.
    In my screen 15 lines are visible,once i enter all 15 rows,vertical scroll bar is active,but rest of all lines are in deactivate mode.
    My requirement is:Once i enter all the visible lines,the remaining lines should be in activ mode(In put control).
    I appreciate your response.
    Best Regards,
    Seshadri

    DATA : BEGIN OF IT_MARA OCCURS 1,
           MATNR LIKE MARA-MATNR,
           ERSDA LIKE MARA-ERSDA,
           ERNAM LIKE MARA-ERNAM,
           MTART LIKE MARA-MTART,
           MBRSH LIKE MARA-MBRSH,
           V_FLAG TYPE C,
           END OF IT_MARA.
    DATA :  WA_MARA LIKE it_MARA .
    CONTROLS TABLE TYPE TABLEVIEW USING SCREEN 100.
    MODULE POPULATE_100 INPUT.
      CASE SY-UCOMM.
        WHEN 'DISP'.
          SELECT MATNR
                 ERSDA
                 ERNAM
                 MTART
                 MBRSH FROM MARA INTO WA_MARA .
            APPEND WA_MARA TO IT_MARA.
          ENDSELECT.
          DESCRIBE TABLE IT_MARA LINES V_TEXT.
          TABLE-LINES = V_TEXT.
          CLEAR IT_MARA.
    Regards..
    Balaji  ( assign if this helps u ..)

  • 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;

  • How to get the Horizontal Scroll Bar for a Table?

    Hi All,
    As per my requirement, I am displaying several records in a Screen in a Tabular Format. But here I have to show 21 Columns in that table which is too high. I am able to display it but due to it I am getting a Horizontal scroll bar for the whole screen since all the columns are not getting displayed in the normal window screen space. But its looking too odd since once I am scrolling it to right the columns are getting displayed but the above Header Bar and Global buttons are not displaying, they are bound to the normal screen space.
    Is there a way to have a Horizontal scroll bar only for that table instead of the entire screen so that on scrolling that bar only the table rows will beshifted ant got displayed?
    With Thanks
    Kumar Gautam

    try this approach.
    include a raw text item before and table item.
    include the appropriate HTML tags in raw text item to enable horizontal scroll
    --Prasanna                                                                                                                                                                                                                                                                                                                                   

  • Missing scroll bars on a pop up window in safari

    I'm not even sure if Im in the right section for this question but I kept getting and error message under the safari topic. I have been trying to have my fantasy football draft, but whenever I open the window to enter the live draft there are no scroll bars. I can only see half of the page and its frustrating because I cant really see what Im doing. My draft is held through yahoo sports, I thought it just might be a problem with yahoo, but any other web browser I used on a different computer works just fine. Im pretty computer illiterate also.

    HI,
    I used on a different computer works just fine
    That computer may be a different model and operating system?
    Try this. From the Safari Menu Bar click Safari/Empty Cache. Relaunch Safari. If the behavior persists, from the Safari Menu Bar (top of your screen) click Safari / Preferences then select the Security tab.
    Click the Show Cookies button. Delete all cookies related to; fantasy football / Yahoo.
    Now click the Autofill tab in the preferences window. Click the Edit button next to: Other forms. Remove all.
    Relaunch Safari.
    If that didn't make a difference, click your Apple Menu (top left corner of your screen) then scroll down and click Software Updates. Make sure your system software is up to date.
    Also, if you have any Safari third party add-ons that control scroll bars, that could be part of the problem.
    Carolyn

  • How do I reposition image scroller bar from middle to the right

    I am customising an image thumb scroller. and trying to follow up previously developed code.
    All worked fine until the last moment when thumbnails bar is positioned as if its starting point is in the middle of the screen. I suppose it was developed for the flash screen layout with centered coordinates. My stage probably has them set to the upper left corner.
    I can not make the bar move.
    My stage size is 1024 x 768
    Where do I do my math in the code so the thumbnails will be located in the middle of the screen rather than in its right hand.
    Here are the code snippets responsible for the thumbnails build up:
      const _THUMB_WIDTH:Number = 50;
      const _THUMB_HEIGHT:Number = 64;
      const _IMAGE_WIDTH:Number = 860;//550;original #
      const _IMAGE_HEIGHT:Number = 500;//355;original #
      const _THUMB_GAP:Number = 2;
      const _SCROLL_SPEED:Number = 12;
      const _SCROLL_AREA:Number = 150;
    var _progressBar:MovieClip;
    var _arrowLeft:MovieClip;
    var _arrowRight:MovieClip;
    var _slides:Array;
    var _curSlide:Slide; //Slide that is currently displaying
    var _loadingSlide:Slide; //only used when a Slide is supposed to show but hasn't been fully loaded yet (like if the user clicks "next" many times before all the images have loaded). We keep track of the one that's in the process of loading and should be shown as soon as it finishes, then we set _loadingSlide back to null.
    var _imagesContainer:Sprite; //the Sprite into which the full-size images are placed (this helps manage the stacking order so that the images can always be behind everything else and yet we can addChild() each image so that it shows up on top of the previous one)
    var _thumbnailsContainer:Sprite; //the Sprite into which the thumbnail images are placed. This also allows us to slide them all at the same time.
    var _destScrollX:Number = 0; //destination x value for the _thumbnailsContainer which is used for scrolling it across the bottom. We don't want to use _thumbnailsContainer.x because it could be in the process of tweening, so we keep track of the end/destination value and add/subtract from it when creating our tweens.
    var _minScrollX:Number; //we know the maximum x value for _thumbnailsContainer is 0, but the mimimum value will depend on how many thumbnail images it contains (the total width). We calculate it in the _setupThumbnails() method and store it here for easier/faster scrolling calculations in the _enterFrameHandler()
    _thumbnailsContainer = new Sprite();
    addChild(_thumbnailsContainer);
    //_thumbnailsContainer.x = -550;//moves x position of thumbnails, instead done in line 273 thumbnail.x = curX - 590;
    _thumbnailsContainer.y = _IMAGE_HEIGHT;//moves y position of thumbnails
    _thumbnailsContainer.alpha = 0; //we want alpha 0 initially because we'll fade it in later when the thumbnails load.
    _thumbnailsContainer.visible = false; //ensures nothing is clickable.
    var xmlLoader:XMLLoader = new XMLLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/data.xml", {onComplete:_xmlCompleteHandler});
    xmlLoader.load();
    function _xmlCompleteHandler(event:LoaderEvent):void {
    _slides = [];
    var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
    var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
    //loop through each <image /> node and create a Slide object for each.
    for each (var image:XML in imageList) {
    _slides.push( new Slide(image.@name,
    image.@description,
    new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
    name:image.@name + "Thumb",
    width:_THUMB_WIDTH,
    height:_THUMB_HEIGHT,
    //centerRegistration:true,
    //x:260, y:320,//doesn't work here but works in line 69
    scaleMode:"proportionalInside",
    bgColor:0x000000,
    estimatedBytes:13000,
    onFail:_imageFailHandler}),
    //loops through all the thumbnail images and places them in the proper order across the bottom of the screen and adds CLICK_THUMBNAIL listeners.
    function _setupThumbnails():void {
    var l:int = _slides.length;
    var curX:Number = _THUMB_GAP;
    for (var i:int = 0; i < l; i++) {
    var thumbnail:Sprite = _slides[i].thumbnail;
    _thumbnailsContainer.addChild(thumbnail);
    TweenLite.to(thumbnail, 0, {colorTransform:{brightness:0.5}});
    _slides[i].addEventListener(Slide.CLICK_THUMBNAIL, _clickThumbnailHandler, false, 0, true);
    thumbnail.x = curX;
    thumbnail.y = -234;//defines y position of the thumbnails row
    curX += _THUMB_WIDTH + _THUMB_GAP;
    _minScrollX = _IMAGE_WIDTH - curX;
    if (_minScrollX > 0) {
    _minScrollX = 0;
    function _enterFrameHandler(event:Event):void {
    if (_thumbnailsContainer.hitTestPoint(this.stage.mouseX, this.stage.mouseY, false)) {
    if (this.mouseX < _SCROLL_AREA) {
    _destScrollX += ((_SCROLL_AREA - this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;
    if (_destScrollX > 0) {  //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number below
    _destScrollX = 0;    //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number above
    TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
    } else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {
    _destScrollX -= ((this.mouseX - (_IMAGE_WIDTH - _SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;
    if (_destScrollX < _minScrollX) {
    _destScrollX = _minScrollX;
    TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});

    Hi, thanks for taking a look at my problem.
    I assume that the code was difficult to read due to an unusual line brakes, which somehow I got when pasting on this site.
    Please take a look I am pasting the code anew in it entirety:
    (please let me know if you would like me to separate the areas which I believe give me troubles to address my previously describe problem:
    All worked fine until the last moment when thumbnails bar is positioned as if its starting point is in the middle of the screen. I suppose it was developed for the flash screen layout with centered coordinates. My stage probably has them set to the upper left corner.
    I can not make the bar move.
    My stage size is 1024 x 768
    Where do I do my math in the code so the thumbnails will be located in the middle of the screen rather than in its right hand.)
    (Also wanted to mention that there an external file Slide.as which is not responsible for the construction and positioning of the thumbnails)
              import com.greensock.*;
              import com.greensock.loading.*;
              //import com.greensock.events.LoaderEvent;
              import com.greensock.loading.display.*;
              //import com.greensock.TweenLite;
              import com.greensock.events.LoaderEvent;
              //import com.greensock.loading.ImageLoader;
              //import com.greensock.loading.SWFLoader;
              //import com.greensock.loading.LoaderMax;
              //import com.greensock.loading.XMLLoader;
              import com.greensock.plugins.AutoAlphaPlugin;
              import com.greensock.plugins.ColorTransformPlugin;
              import com.greensock.plugins.GlowFilterPlugin;
              import com.greensock.plugins.BlurFilterPlugin;//i added this filter to blur the progressBar
              import com.greensock.plugins.TweenPlugin;
              import flash.display.MovieClip;
              import flash.display.Sprite;
              import flash.events.Event;
              import flash.events.MouseEvent;
              //public class SlideshowExample extends MovieClip {
                          const _THUMB_WIDTH:Number = 50;
                          const _THUMB_HEIGHT:Number = 64;
                          const _IMAGE_WIDTH:Number = 860;//550;original #
                          const _IMAGE_HEIGHT:Number = 500;//355;original #
                          const _THUMB_GAP:Number = 2;
                          const _SCROLL_SPEED:Number = 12;
                          const _SCROLL_AREA:Number = 150;
                         var _progressBar:MovieClip;
                         var _arrowLeft:MovieClip;
                         var _arrowRight:MovieClip;
                         var _slides:Array;
                         var _curSlide:Slide; //Slide that is currently displaying
                         var _loadingSlide:Slide; //only used when a Slide is supposed to show but hasn't been fully loaded yet (like if the user clicks "next" many times before all the images have loaded). We keep track of the one that's in the process of loading and should be shown as soon as it finishes, then we set _loadingSlide back to null.
                         var _imagesContainer:Sprite; //the Sprite into which the full-size images are placed (this helps manage the stacking order so that the images can always be behind everything else and yet we can addChild() each image so that it shows up on top of the previous one)
                         var _thumbnailsContainer:Sprite; //the Sprite into which the thumbnail images are placed. This also allows us to slide them all at the same time.
                         var _destScrollX:Number = 0; //destination x value for the _thumbnailsContainer which is used for scrolling it across the bottom. We don't want to use _thumbnailsContainer.x because it could be in the process of tweening, so we keep track of the end/destination value and add/subtract from it when creating our tweens.
                         var _minScrollX:Number; //we know the maximum x value for _thumbnailsContainer is 0, but the mimimum value will depend on how many thumbnail images it contains (the total width). We calculate it in the _setupThumbnails() method and store it here for easier/faster scrolling calculations in the _enterFrameHandler()
                         //function SlideshowExample() {
                                  //super();
                                  //activate the plugins that we'll be using so that TweenLite can tween special properties like filters, colorTransform, and do autoAlpha fades.
                                  TweenPlugin.activate([AutoAlphaPlugin, ColorTransformPlugin, GlowFilterPlugin, BlurFilterPlugin]);//i added BlurFilterPlugin at the end
                                  _progressBar = this.getChildByName("progress_mc") as MovieClip;
                                  _arrowLeft = this.getChildByName("arrowLeft_mc") as MovieClip;
                                  _arrowRight = this.getChildByName("arrowRight_mc") as MovieClip;
                                  //////////my additions to make progress bay blurry
                                  TweenLite.to(progress_mc.progressBar_mc.gradientbar_appLoader_mcPopUp_mc, 0, {blurFilter:{blurX:21, blurY:8}});//i added this line to make ProgressBar_mc to blur
                                  TweenLite.to(progress_mc.rectangleGray, 0, {blurFilter:{blurX:21, blurY:8}});//i added this line to make ProgressBar_mc to blur
                                  _arrowLeft.visible = _arrowRight.visible = false;
                                  _imagesContainer = new Sprite();
                                  this.addChildAt(_imagesContainer, 0);
                                  _thumbnailsContainer = new Sprite();
                                  addChild(_thumbnailsContainer);
                                  //_thumbnailsContainer.x = -550;//moves x position of thumbnails, instead done in line 273 thumbnail.x = curX - 590;
                                  _thumbnailsContainer.y = _IMAGE_HEIGHT;//moves y position of thumbnails
                                  _thumbnailsContainer.alpha = 0; //we want alpha 0 initially because we'll fade it in later when the thumbnails load.
                                  _thumbnailsContainer.visible = false; //ensures nothing is clickable.
                                  var xmlLoader:XMLLoader = new XMLLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/data.xml", {onComplete:_xmlCompleteHandler});
                                  xmlLoader.load();
                         function _xmlCompleteHandler(event:LoaderEvent):void {
                                  _slides = [];
                                  var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
                                  var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
                                  //loop through each <image /> node and create a Slide object for each.
                                  for each (var image:XML in imageList) {
                                            _slides.push( new Slide(image.@name,
                                                                                                        image.@description,
                                                                                                        new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
                                                                                                                                                          name:image.@na me + "Thumb",
                                                                                                                                                          width:_THUMB_W IDTH,
                                                                                                                                                          height:_THUMB_ HEIGHT,
                                                                                                                                                          //centerRegist ration:true,
                                                                                                                                                          //x:260, y:320,//doesn't work here but works in line 69
                                                                                                                                                          scaleMode:"pro portionalInside",
                                                                                                                                                          bgColor:0x0000 00,
                                                                                                                                                          estimatedBytes :13000,
                                                                                                                                                          onFail:_imageF ailHandler}),
                                                                                                        new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
                                                                                                                                                  name:image.@name + "Image",
                                                                                                                                                  width:_IMAGE_WIDTH,
                                                                                                                                                  height:_IMAGE_HEIGHT,
                                                                                                                                                  //centerRegistration:true,
                                                                                                                                                  x:-420, y:-260,
                                                                                                                                                  scaleMode:"proportionalInside",
                                                                                                                                                  bgColor:0x000000,
                                                                                                                                                  estimatedBytes:820000,
                                                                                                                                                  onFail:_imageFailHandler})
                                  //now create a LoaderMax queue and populate it with all the thumbnail ImageLoaders as well as the very first full-size ImageLoader. We don't want to show anything until the thumbnails are done loading as well as the first full-size one. After that, we'll create another LoaderMax queue containing the rest of the full-size images that will load silently in the background.
                                  var initialLoadQueue:LoaderMax = new LoaderMax({onComplete:_initialLoadComplete, onProgress:_progressHandler});
                                  for (var i:int = 0; i < _slides.length; i++) {
                                            initialLoadQueue.append( _slides[i].thumbnailLoader );
                                  initialLoadQueue.append(_slides[0].imageLoader); //make sure the very first full-sized image is loaded initially too.
                                  initialLoadQueue.load();
                                  _setupThumbnails();
                         function _initialLoadComplete(event:LoaderEvent):void {
                                  //now that the initial load is complete, fade out the progressBar. autoAlpha will automatically set visible to false once alpha hits 0.
                                  TweenLite.to(_progressBar, 0.5, {autoAlpha:0});
                                  //fade in the thumbnails container
                                  TweenLite.to(_thumbnailsContainer, 1, {autoAlpha:1});
                                  _setupArrows();
                                  //setup the ENTER_FRAME listeners that controls the thumbnail scrolling behavior at the bottom
                                  this.stage.addEventListener(Event.ENTER_FRAME, _enterFrameHandler, false, 0, true);
                                  //now put all the remaining images into a LoaderMax queue that will load them one-at-a-time in the background in the proper order. This can greatly improve the user's experience compared to loading them on demand which forces the user to wait while the next image loads.
                                  var imagesQueue:LoaderMax = new LoaderMax({maxConnections:1});
                                  for (var i:int = 1; i < _slides.length; i++) {
                                            imagesQueue.append( _slides[i].imageLoader );
                                  imagesQueue.load();
                                  //now start the slideshow
                                  _showNext(null);
                        //loops through all the thumbnail images and places them in the proper order across the bottom of the screen and adds CLICK_THUMBNAIL listeners.
                         function _setupThumbnails():void {
                                  var l:int = _slides.length;
                                  var curX:Number = _THUMB_GAP;
                                  for (var i:int = 0; i < l; i++) {
                                            var thumbnail:Sprite = _slides[i].thumbnail;
                                            _thumbnailsContainer.addChild(thumbnail);
                                            TweenLite.to(thumbnail, 0, {colorTransform:{brightness:0.5}});
                                            _slides[i].addEventListener(Slide.CLICK_THUMBNAIL, _clickThumbnailHandler, false, 0, true);
                                            thumbnail.x = curX;
                                            thumbnail.y = -234;//defines y position of the thumbnails row
                                            curX += _THUMB_WIDTH + _THUMB_GAP;
                                  _minScrollX = _IMAGE_WIDTH - curX;
                                  if (_minScrollX > 0) {
                                            _minScrollX = 0;
                         function _setupArrows():void {
                                  _arrowLeft.alpha = _arrowRight.alpha = 0;
                                  _arrowLeft.visible = _arrowRight.visible = true;
                                  _arrowLeft.addEventListener(MouseEvent.ROLL_OVER, _rollOverArrowHandler, false, 0, true);
                                  _arrowLeft.addEventListener(MouseEvent.ROLL_OUT, _rollOutArrowHandler, false, 0, true);
                                  _arrowLeft.addEventListener(MouseEvent.CLICK, _showPrevious, false, 0, true);
                                  _arrowRight.addEventListener(MouseEvent.ROLL_OVER, _rollOverArrowHandler, false, 0, true);
                                  _arrowRight.addEventListener(MouseEvent.ROLL_OUT, _rollOutArrowHandler, false, 0, true);
                                  _arrowRight.addEventListener(MouseEvent.CLICK, _showNext, false, 0, true);
                         function _showNext(event:Event=null):void {
                                  //if there's a _loadingSlide we should assume that the next Slide would be AFTER that one. Otherwise just get the one after the _curSlide.
                                  var next:int = (_loadingSlide != null) ? _slides.indexOf(_loadingSlide) + 1 : _slides.indexOf(_curSlide) + 1;
                                  if (next >= _slides.length) {
                                            next = 0;
                                  _requestSlide(_slides[next]);
                         function _showPrevious(event:Event=null):void {
                                  //if there's a _loadingSlide we should assume that the previous Slide would be BEFORE that one. Otherwise just get the one before the _curSlide.
                                  var prev:int = (_loadingSlide != null) ? _slides.indexOf(_loadingSlide) - 1 : _slides.indexOf(_curSlide) - 1;
                                  if (prev < 0) {
                                            prev = _slides.length - 1;
                                  _requestSlide(_slides[prev]);
                         function _requestSlide(slide:Slide):void {
                                  if (slide == _curSlide) {
                                            return;
                                  //kill the delayed calls to _showNext so that we start over again with a 5-second wait time.
                                  TweenLite.killTweensOf(_showNext);
                                  if (_loadingSlide != null) {
                                            _cancelPrioritizedSlide(); //the user must have skipped to another Slide and didn't want to wait for the one that was loading.
                                  //if the requested Slide's full-sized image hasn't loaded yet, we need to show the progress bar and wait for it to load.
                                  if (slide.imageLoader.progress != 1) {
                                            _prioritizeSlide(slide);
                                            return;
                                  //fade the old Slide and make sure it's not highlighted anymore as the current Slide.
                                  if (_curSlide != null) {
                                            TweenLite.to(_curSlide.image, 0.5, {autoAlpha:0});
                                            _curSlide.setShowingStatus(false);
                                  _curSlide = slide;
                                  _imagesContainer.addChild(_curSlide.image); //ensures the image is at the top of the stacking order inside the _imagesContainer
                                  TweenLite.to(_curSlide.image, 0.5, {autoAlpha:1}); //fade the image in and make sure visible is true.
                                  _curSlide.setShowingStatus(true); //adds an outline to the image indicating that it's the currently showing Slide.
                                  TweenLite.delayedCall(5, _showNext); //create a delayedCall that will call _showNext in 5 seconds.
                         function _prioritizeSlide(slide:Slide):void {
                                  TweenLite.to(_progressBar, 0.5, {autoAlpha:1}); //show the progress bar
                                  _loadingSlide = slide;
                                  _loadingSlide.imageLoader.addEventListener(LoaderEvent.PROGRESS, _progressHandler);
                                  _loadingSlide.imageLoader.addEventListener(LoaderEvent.COMPLETE, _completePrioritizedHandler);
                                  _loadingSlide.imageLoader.prioritize(true); //when the loader is prioritized, it will jump to the top of any LoaderMax queues that it belongs to, so if another loader is in the process of loading in that queue, it will be canceled and this new one will take over which maximizes bandwidth utilization. Once the _loadingSlide is done loading, the LoaderMax queue(s) will continue loading the rest of their images normally.
                         function _cancelPrioritizedSlide():void {
                                  TweenLite.to(_progressBar, 0.5, {autoAlpha:0}); //hide the progress bar
                                  _loadingSlide.imageLoader.removeEventListener(LoaderEvent.PROGRESS, _progressHandler);
                                  _loadingSlide.imageLoader.removeEventListener(LoaderEvent.COMPLETE, _completePrioritizedHandler);
                                  _loadingSlide = null;
                         function _completePrioritizedHandler(event:LoaderEvent):void {
                                  var next:Slide = _loadingSlide; //store it in a local variable first because _cancelPrioritizedSlide() will set _loadingSlide to null.
                                  _cancelPrioritizedSlide();
                                  _requestSlide(next);
                         function _progressHandler(event:LoaderEvent):void {
                                  _progressBar.progressBar_mc.scaleX = event.target.progress;
                         function _clickThumbnailHandler(event:Event):void {
                                  _requestSlide(event.target as Slide);
                         function _rollOverArrowHandler(event:Event):void {
                                  TweenLite.to(event.currentTarget, 0.5, {alpha:1});
                         function _rollOutArrowHandler(event:Event):void {
                                  TweenLite.to(event.currentTarget, 0.5, {alpha:0});
                         function _enterFrameHandler(event:Event):void {
                                  if (_thumbnailsContainer.hitTestPoint(this.stage.mouseX, this.stage.mouseY, false)) {
                                            if (this.mouseX < _SCROLL_AREA) {
                                                      _destScrollX += ((_SCROLL_AREA - this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;
                                                      if (_destScrollX > 0) {  //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number below
                                                                _destScrollX = 0;    //this number is 1/2 the stage size, previously was at 0 it defines the left position of the thumbnails scroll end, has to be indentical to the number above
                                                      TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
                                            } else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {
                                                      _destScrollX -= ((this.mouseX - (_IMAGE_WIDTH - _SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;
                                                      if (_destScrollX < _minScrollX) {
                                                                _destScrollX = _minScrollX;
                                                      TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
                        //if an image fails to load properly, remove it from the slideshow completely including its thumbnail at the bottom.
                         function _imageFailHandler(event:LoaderEvent):void {
                                  var slide:Slide;
                                  var i:int = _slides.length;
                                  while (--i > -1) {
                                            slide = _slides[i];
                                            if (event.target == slide.thumbnailLoader || event.target == slide.imageLoader) {
                                                      slide.dispose();
                                                      _slides.splice(i, 1);
                                                      _setupThumbnails();
                                                      return;

  • 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

Maybe you are looking for