cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xzDan
Level 8

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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

xzDan
Level 8

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,103)