web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disable button until t...
Power Apps
Answered

Disable button until text field is scrolled to end

(0) ShareShare
ReportReport
Posted on by 102

Hi,

I have a text label in my app, lab_terms,  which contains Terms and Conditions.  It is scrollable and contains more text than will fit on a single screen.

On the same screen there is a button, btn_Next, that advances the user to the next screen.

I'm want to use DisplayMode to disable the button until the user has scrolled to the end of lab_terms, but I'm not having any luck.

Is this possible? Or am I wishing for a beer and money tree again?

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @Matt_uhb ,

     

    As far as I know there is now property to reference which will return the where the user has scrolled to for a Label control.

     

    What you can do, is build your own scroll function that does include this functionality using a container, a label and some icons:

    BCBuizer_0-1682871842059.png

    As you can see the label is bigger than the container, but the part outside of the container is not visible. By clicking the arrow icons the user can scroll down. This works using a variable, which you can then leverage to keep track of where the user is scrolling.

     

    The property settings for this:

     

    Label

     

    AutoHeight = true
    Y = varScroll

     

     

    Icon Up

     

    DisplayMode = If(varScroll = 0, DisplayMode.Disabled,DisplayMode.Edit)
    OnSelect = UpdateContext({varScroll: varScroll+50})

     

     

    Icon Down

     

    DisplayMode = If(-varScroll+ Container.Height >= Label.Height, DisplayMode.Disabled, DisplayMode.Edit)
    
    OnSelect = UpdateContext({varScroll: varScroll-50});
    If(
     -varScroll+ Container1.Height >= Label5.Height &&
     !varScrolledToBottom,
     UpdateContext({varScrolledToBottom:true})
    );

     

     

    With these formulas, varScrolledToBottom will be set to true the first time the user scrolls to the bottom and will remain true even if the user scroll back up. It can be referenced directly in the DisplayMode property of the button to be enabled:

     

     

    If(varScrolledToBottom, DisplayMode.Edit, DisplayMode.Disabled)

     

     

    Please do make sure to properly initialize the variables, for instance in the OnVisible property of the screen that has this functionality:

     

    UpdateContext({varScroll:0, varScrolledToBottom:false})

     

     

     

    Edit: To improve the user experience, you may even throw a slider in the mix.

  • Verified answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @Matt_uhb ,

     

    COme to think of it, the slider is probably more user friendly and easier to implement. The setup is similar to the one described before, but instead of 2 icons, use a slider.

     

    The following property settings should be used:

     

    Label:

     

     

    AutoHeight = true
    Y = Slider.Value

     

     

     

    Slider:

     

     

    Default = Self.Min
    Layout = Layout.Vertical
    Max = 0
    Min = -Label.Height + Container.Height
    ShowValue = false

     

     

     

    The Slider.Value property can now be used to determine if the user is at the bottom to enable the button:

     

     

    If(Slider.Value = Slider.Min, DisplayMode.Edit, DisplayMode.Disabled)

     

     

    Resetting the slider will move the label back to the top.

     

     

  • Matt_uhb Profile Picture
    102 on at

    Ok, first of all, genius solution, @BCBuizer, thanks.

    However, the way it works is the opposite of the desired behaviour, i.e. as it is, the button is initially enabled, then becomes disabled as you slide it.

     

    So I set the slider (sld_termsScroll) height to the height of my container and dropped a temporary label in there with the Text value as sld_termsScroll.Value to show me what the min value would be at when at the bottom of the scroll (-1813).

    I then set the DisplayMode of the button to 

    If(sld_termsScroll.Value < -1800, DisplayMode.Edit, DisplayMode.Disabled)

     And it is all good.

    Thanks again for your help.  have a good one.

     

    Matt.

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi  @Matt_uhb ,

     

    Indeed you're right, instead of referencing the Slider.Max, the Slider.Min property should be referenced to make sure the user has scrolled to the bottom. I'll amend the post you marked as the solution.

     

    The reason I reference this property instead of a hardcoded value is because the content of the label may change over time. With these settings, the solution will automatically adapt to the changes instead of you having to make changes in multiple places to get things to work again.

  • Matt_uhb Profile Picture
    102 on at

    A very good point.  

    Thanks again

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard