Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Programatically set horizontal scroll bar position in timeline

    SmartClient version v10.1p_2016-11-11/PowerEdition deployment ( built 2016-11-11)

    Can you provide some guidance, perhaps an example, of how to set the horizontal scroll bar position all the way the right for a timeline ( or layout)

    Thanks

    #2
    See scrollToTime().

    Comment


      #3
      Thanks for the response

      I had looked at that, specifically called scrollToTime( "2018-07-05T23:59:59") where
      timeString is the 8601 formatted string obtained from timeline.getEndDate() with no success.
      To be clear horizontal scroll bar on timeline was displayed, set all the way to the left. NO change after scrollToTime call.

      Is something else required ??

      Thanks

      Comment


        #4
        Should have mentioned in last post that timeline is in Timeline view, vs Day or Week; so although I tried scrollToTime I thought that might be an issue, I also tried the scrollToRight ( which would seem to be exactly what I wanted ) with out success.

        Comment


          #5
          Pass a Date instance, not a String.

          Comment


            #6
            According to the docs the method scrollToTime is defined as:

            Scroll the calendar Day or Week view to the specific time

            public void scrollToTime (java.lang.String time)
            where time is any parsable time-string

            I tried passing in a Date (hoping maybe there was an undocumented method) but no such method exists ( will not compile )
            Also the timeline view is "Timeline" ( not Day or Week) ?

            Also tried several of the other scrollToXXX methods
            scrollToBottom, scrollToRight, etc. and all seem to have no affect ?

            Thanks

            Comment


              #7
              Apologies, yes, scrollToTime() is intended for vertical views only, because its parameter is actually an arbitrary time, not a time on a specific date. We'll audit the doc for that method.

              In terms of Timelines, CalendarViews are ListGrids, and it's the body of the ListGrid that you want to scroll. So timeline.getTimelineView().getBody().scrollToRight() will do what you need.

              Comment


                #8
                That works. Thanks so much for working with me on this .

                Comment

                Working...
                X