on 07-03-2018 5:06 PM
Moving right along and now comes the fun part -- formatting. Usually I would just use the built in editor features, but the string is concatenated to display Wd x Ht x Dp depending on a condition.
While it currently displays ok, I need to pad out each field with white spaces (and center) to align with my headers above.
Wd, Ht and Dp are currently defined as strings, is it possible to format and center using white spaces and calculating the length of each value?
global stringvar Width := totext({width},0,"")
global stringvar Height := totext({height},0,"")
global stringvar Depth := totext({depth},0,"")
Default Condition:
(Width) & ' X ' & (Height) & ' X ' & (Depth)
Gary
Is there a particular reason why you can't just make the text box a specific width and center its contents?
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because I have a flair for over complicating the simplest of things. I've made a text box and monkeyed with some manual spacing. While it's not perfect, it does align itself a little better. It will work for now but a proper solution will always be on my list. OCD does this to a person.
Gary
Sure, here it is. Understanding that width, height and depth values can be both 4 characters each. I manually put in 4 spaces each to at least clean it up a bit.
Gary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you do not want to use fixed length font you will need to convert to 3 fields. So instead of changing order of a concatenated string. Create 3 formulae, for Position 1 which changes from width, depth or height., repeat for position 2 & 3.
Place these formula fields on designer, align with your headers and then place text boxes with X between,
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gary,
Could you please post a screenshot of how the alignment is right now?
I'm guessing you'd have to use a fixed-width font to get it perfectly aligned.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.