cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vidanaw
Level: Powered On

Move controls up and down based on the Radio button selection

Hi All,

 

I have the following requirement.

 

question.png

Only when  I click on the Radio button 2 I want to display text box 1, when the Text box 1 displays I want to shift down all the other controls eg- lable1 and text box 2. But when I click on the Radio button 1 I want to hide the Text box 1 and move up all the other controls to fill the Text box 1 space on the screen.

Can someone please tell me how to do this, I can display and hide the text box 1 based on the Radio button selection, but I dont know how to move the controls up and down.  I managed to to move up and down as follows

Text box 2 and Label 1 Y property set to If(Radio1.Selected.Value="two",306,204), but are there any other better way to do this as I have to do the same for Label2 and Text box 4 based on "green selection", I have to continue this for a couple of filed.

Also, I want to display a vertical scroll bar when the controls are moves down as the height of the screen is not enough to display all controls.  

Much appreciate any help. 

Thank you very much. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Move controls up and down based on the Radio button selection

Hey @Vidanaw 

 

I know this is hard, but the only way to set the property of all the controls, you need to update them individually. If this suits, you can use a scroll-able screen and place all your controls there. In this case, you will be able to scroll through the screen and show all your controls.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Move controls up and down based on the Radio button selection

Hey @Vidanaw 

 

To move, the control up and down, you need to set the Y property of the controls.
 
TextInput1: 
Visible -> If(Radio1.Selected.Value = 2, true,false)
 
TextInput2 and Label1:
Y -> If(Radio1.Selected.Value = 2, 550, 450)
 
550 is the coordinate that will be used if 2 is selected and 450 for other input.
 
In a case, where you think the screen size is small compared to your requirement, you might want to create a new scrollable screen.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Vidanaw
Level: Powered On

Re: Move controls up and down based on the Radio button selection

Thank you very much @yashag2255 , yes as you have mentioned I managed to move the text box and the label, but I have a lot of controls to move, could you please read my initial post again as I have changed it a bit, much appreciate your professional advice. 

Pranav_Shroti
Level: Powered On

Re: Move controls up and down based on the Radio button selection

Well there is no easy of doing this. All the controls below need to be related/dependent to each other. I have created a dynamic messagebox using below method:

 

1. Take a variable and set a default value to Exactly Second.Top = TextBox.Top

2. Set all the other components Top property dependent on their above component. -

Third.Top= Second.Top + Second.Height +10

Forth.Top= Third.Top + Third.Height + 10

and so on...

3. When you show TextBox then set the Second.Top = TextBox.Top + TextBox.Height + 10

 

Hope this helps,

Pranav

 

Dual Super User
Dual Super User

Re: Move controls up and down based on the Radio button selection

Hey @Vidanaw 

 

I know this is hard, but the only way to set the property of all the controls, you need to update them individually. If this suits, you can use a scroll-able screen and place all your controls there. In this case, you will be able to scroll through the screen and show all your controls.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 405 members 5,610 guests
Please welcome our newest community members: