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 / Hide control on small ...
Power Apps
Answered

Hide control on small screens

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm working with a split screen layout in a canvas app, and would like to hide leftsidecontainer on small screens.

 

leftsidecontainer contains an image, it is part of a login page, where the rightsidecontainer includes login buttons.

 

Question is: how can I hide a power apps control on small screens (a container, an image, or even a button)?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @Anonymous set the width and height as variable for what you deem as a small screen.

    {OnStart}

    Set(smallScreen,{width: yourSmallScreenWidthValue, height: yourSmallScreenHightValue})

     

    As an example i will use texboxes to show and hid a control, with width 126

    rubin_boer_0-1634546341369.png

    the rectangular's visible is set to Self.Width >= smallScreen.width

     

     

    Lets set the with to smaller than 126 (120)

    rubin_boer_2-1634546750901.png

     The rectanuglar contrl is not visble anymore.

     

    Summary

    Set your screen dimension for small screen

    Set(smallScreen,{width: yourSmallScreenWidthValue, height: yourSmallScreenHightValue})

    Set the visibiltiy of the control to Self.Width >= smallScreen.width || Self.Height >= smallScreen.height

     

    Hope this helps

    R

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Works nicely as described, thank you @rubin_boer 🌞

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard