Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 04:30
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  V2 Components (Flash MX 2004 - Flash 8) (Moderators: vesa kortelainen, Ronald Wernecke, Jorge Solis, ..:: Mazhar Hasan ::.., papachan)
| | |-+  Scroll Pane Problem
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Scroll Pane Problem  (Read 2051 times)
jim
Server what's that
*
Posts: 9



View Profile Email
« on: 10/28/06, 21:04 »

I have a date chooser and a scroll pane component on the stage. Using the content path parameter I am loading an external shockwave file into the scroll pane. Everything work fine. The user selects a data and the new contents for that date are displayed in the scroll pane.

The problem is that when the number of records exceeds the viewable area of the scroll pane on the stage the scroll pane doesn't update to reflect the change. The vertical scroll bar never appears so the user can't get to records. I am calling a function in the loaded file (content path) to update the XML. This works I see it.

    my_sp.setScrollContent(_level0.my_sp.spContentHolder.doMe())
         my_sp.refreshPane(); 
How do I get the scroll pane to add the vertical scroll bars when the records to display exceed the viewable area. One fix was that I put a movie clip at the bottom of the stage in the imported swf this forced the scroll bars to be present but if the records surpass the stage height of the imported movie I get the same problem

Please help. I need some mentoring.

Jim
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 10/30/06, 02:29 »

I usually set the vScrollPolicy to off and on to force the scrollbar redraw.

Jorge
Logged

jim
Server what's that
*
Posts: 9



View Profile Email
« Reply #2 on: 10/31/06, 11:41 »

Thanks for the info I got it sorted a friend told me about using invalidate() by doing the following

my_sp.refresh();// to be used when I want to redraw the scrollpane.content
my_sp.invalidate();// to be used when I want to refresh the scroll bars(?)

This worked but I have yet to see the invalidate method documented thanks for your replly.

Jim
Logged
jim
Server what's that
*
Posts: 9



View Profile Email
« Reply #3 on: 10/31/06, 11:47 »

I just found this out so maybe if anyone else is trying to get a component to redraw themselves with new content

About invalidation

Macromedia recommends that a component not update itself immediately in most cases, but that it instead should save a copy of the new property value, set a flag indicating what is changed, and call the invalidate() method. The Invalidate method indicates that just the visuals for the component have changed, but size and position of subobjects have not changed. This method calls the draw() method.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!