Alpha DevCon 2018
Results 1 to 11 of 11

Thread: Cannot scroll a panel card with a fixed height List control

  1. #1
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Cannot scroll a panel card with a fixed height List control

    I have a panel card with several controls including a 3" fixed height List control. If I first click on the List control and try to scroll up or down, the panel card will not scroll. It scrolls just fine if I first click anywhere outside of the List control. I've never noticed this behavior before. Possibly because most of my list controls fill the entire container.

    Thanks

  2. #2
    Member compuaid's Avatar
    Real Name
    Brad Weaver
    Join Date
    Aug 2007
    Location
    Ottawa, ON
    Posts
    365

    Default Re: Cannot scroll a panel card with a fixed height List control

    I think the problem is that if you have a list control by it's very nature you need to be able to scroll it to see all items on the list. That being the case the list control grabs the event handler for scrolling and overrides the event handler for panel card scrolling. If it didn't work that way then every time you tried to scroll the list you'd end up changing your panel card
    Brad Weaver, President
    ComputerAid International
    Ottawa ON Canada
    Versailles KY USA
    www.compuaid.com

  3. #3
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Re: Cannot scroll a panel card with a fixed height List control

    I understand and that makes sense, but this particular list control has a fixed number of rows and the list height exposes all of the rows so it never needs to scroll to show any hidden rows. I was hoping there was an option or technique to prevent the list control from handling the drag scroll events and instead allow the panel card event handler to process them.

  4. #4
    Member
    Real Name
    Jim DeWitt
    Join Date
    Jun 2014
    Posts
    50

    Default Re: Cannot scroll a panel card with a fixed height List control

    Bump

    Quote Originally Posted by DaveF View Post
    I understand and that makes sense, but this particular list control has a fixed number of rows and the list height exposes all of the rows so it never needs to scroll to show any hidden rows. I was hoping there was an option or technique to prevent the list control from handling the drag scroll events and instead allow the panel card event handler to process them.

  5. #5
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,381

    Default Re: Cannot scroll a panel card with a fixed height List control

    Have you tried panel layouts?
    Put a panel layout set TTB in layout flow around all your controls, put the list in its own panel card and the other controls in their own panel card(s) either above or below the list then each panel will scroll independently if it is large enough to create a scroll effect

  6. #6
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Re: Cannot scroll a panel card with a fixed height List control

    Lance - That won't work because I do not want my list control to scroll independently from the panelcard. I want to be able to tap/click anywhere in the list control and drag scroll the entire panelcard. It is a very small list control which only displays 3 or 4 rows which are always visible.

    I just heard that alpha is coming out with a new control called a "ViewBox". It is a scaled down version of the List control and provides the behavior I am looking for.

    Thanks

  7. #7
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Re: Cannot scroll a panel card with a fixed height List control

    Adding the following code to the onRenderComplete event will prevent a list control from responding to drag scroll events. If you attempt to drag scroll by first clicking on the list control, the panelcard will scroll instead.

    var lObj = {dialog.object}.getControl('list1');
    var id = lObj.contId+'.CONTENTWRAPPER';
    A5.u.drag.setDisabled(id,'scroll',true);

  8. #8
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,545

    Default Re: Cannot scroll a panel card with a fixed height List control

    Hhmm... My solution is similar to Lance's. A panel layout w. 2 panelcards. The bottom card has a list which always shows the 3 most recent records entered. The top panel has up to 14 fields. The top is 67%, the bottom is 33%. The bottom is not scrollable, but the top panel is. Clicking on the list doesn't prevent the top panel from scrolling. Or am I missing a more subtle point?

  9. #9
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Re: Cannot scroll a panel card with a fixed height List control

    Peter - In this case, I do not want the list control to always be in view at the bottom of the screen with the other controls in a section above scrolling independently of it. I want it to appear in a single panelcard with other controls above it and it is okay for it to scroll off the screen. My problem was when you attempted to drag scroll the entire page of controls up or down and happened to be touching inside the the list control. The list control was capturing the drag scroll event and not allowing me to drag scroll the panelcard up or down.

  10. #10
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,545

    Default Re: Cannot scroll a panel card with a fixed height List control

    I see. I knew I must have been missing something. What if you use a static text control or a freeform? Just populate it w. some xbasic.

  11. #11
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Re: Cannot scroll a panel card with a fixed height List control

    Peter - Here is a screen shot so you can get a better idea of what I'm doing. I originally used a repeating section, but it did not look very good and used up too much space for a mobile app. The list control does exactly what I want except there is no option to propagate the drag scroll events to the panelcard. Using the code in my post above, I can now tap anywhere on the page including on the list control and drag the page up or down. The app feels broken when nothing happens if you happen to be be on the list control and attempt to scroll the page up or down.

    By the way, I lied about the list control being fixed length in order to simplify my post. It can shrink and grow, but I dynamically change the height and hide the control when there are no attachments. There are typically 0 to 3 attachments. Thanks for your suggestions.

    Email.JPG

Similar Threads

  1. Using the Chrome browser, scroll bars do not show in a UX while using the list control.
    By reedallenbrown in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-25-2016, 08:31 AM
  2. How to show/hide a panel card based on a control in side a panel navigator?
    By Ferenju in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 03-18-2014, 01:07 PM
  3. Can't scroll grid in panel card
    By Terry in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 04-25-2013, 05:15 PM
  4. V12: List Control inside of panelcard does not scroll
    By coleresources in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 04-18-2013, 01:01 PM
  5. How to control line height within a xdialog record list list box
    By Fator in forum Alpha Five Version 10 - Desktop Applications
    Replies: 12
    Last Post: 05-13-2010, 01:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •