cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver III
Resolver III

Reliable tab-spacing of text?

In order to reduce the number of text boxes in my gallery, and to avoid using a datatable due to its limited formatting options, I wish to use ideally one text box and space out the entries appropriately. (It looks like table of data). At home, I found using Char(9) to be appropriate, with e.g. "ThisItem.Name & Char(9) & Char(9) & ThisItem.Price" etc., but at work, I find that the Char(9) seems to be equivalent only to a typical space gap. Is there any appropriate and reliable way to appropriately space or pad entries? I did try to do a Left(ThisItem.Name & " ",10), say, but the character spacing differs and can still lead to misaligned entries.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Reliable tab-spacing of text?

A gallery with properly placed label controls would be the best way to create such a table (if the data table doesn't have what you need), but if you want to go the text box (label?) route, then you will need to use a fixed-size font (such as 'Courier New') in the text box, otherwise the characters will be out of order.

Another alternative, if you're comfortable with HTML, is to use a HTML Viewer control, where you can have more control over formatting of each individual cell in a table.

The attached app shows both alternatives. To open it, save it locally, go to https://create.powerapps.com, select Open and Browse Files, then find the place where you saved it.

Hope this helps!

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: Reliable tab-spacing of text?

A gallery with properly placed label controls would be the best way to create such a table (if the data table doesn't have what you need), but if you want to go the text box (label?) route, then you will need to use a fixed-size font (such as 'Courier New') in the text box, otherwise the characters will be out of order.

Another alternative, if you're comfortable with HTML, is to use a HTML Viewer control, where you can have more control over formatting of each individual cell in a table.

The attached app shows both alternatives. To open it, save it locally, go to https://create.powerapps.com, select Open and Browse Files, then find the place where you saved it.

Hope this helps!

View solution in original post

Highlighted
Resolver III
Resolver III

Re: Reliable tab-spacing of text?

Hi

Thanks a lot, the Courier New option seems to be working well. Btw I am doing this because with several controls for individual labels (8 or so columns), it seems noticeably faster to have one text box.

For the HTML, as im not too familar with it, is there a quick way of padding cells without an entire table? My intent is each gallery option has 'columns'. I dont know if the way your app (thank you for that) can allow for the entries to be selected as that is what I am needing from the gallery.

 

Edit: Whoops I can just keep only the header part!

 

And yeah a datatable would be ideal, but unfortunately has no conditional formatting

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,642)