I've added folowing into my chocie options field
LPAD(RLKCTL1B, 1) || ' -- ' || LPAD(RLBTW, 5) || '%'
In PUISSNVP I found
SELECT DISTINCT LPAD(RLKCTL1B, 1) || ' -- ' || LPAD(RLBTW, 5) || '%',
RLKCTL1B, RLKCTL1B
FROM CONTRL_T
ORDER BY RLKCTL1B
In SQL I get it nicely aligened
but in Profound I get it differently
Any ideas?
Thanks in advance,
John Engels
Choice options field
-
- New User
- Posts: 4
- Joined: Fri Aug 11, 2017 2:33 am
- First Name: John
- Last Name: Engels
- Company Name: BeesdA2 BV
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Choice options field
It's a difference between how a web browser works and how a green-screen works. In green-screen, all of the characters take up the same amount of space, and blanks also take up the same amount of space.
In the web world, a blank is only shown once, no matter how many there is. So 5 blanks and 1 blank are the same. And, each character takes up a variable width.
In the web world, a blank is only shown once, no matter how many there is. So 5 blanks and 1 blank are the same. And, each character takes up a variable width.
-
- New User
- Posts: 4
- Joined: Fri Aug 11, 2017 2:33 am
- First Name: John
- Last Name: Engels
- Company Name: BeesdA2 BV
- Contact:
Re: Choice options field
Hi Scott,
thanks for your answer.
've taken a look at some discussions on the web and how this can be solved. That’s way out of my current knowledge.
Have experimented a little bit with adding “white-space: pre” into the CSS but that doesn’t seem to work. Guess we’ll have to take it as it is.
thanks for your answer.
've taken a look at some discussions on the web and how this can be solved. That’s way out of my current knowledge.
Have experimented a little bit with adding “white-space: pre” into the CSS but that doesn’t seem to work. Guess we’ll have to take it as it is.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Choice options field
What type of widget are you using the choice options field with? Is it dropdown, combo box or textbox?
-
- New User
- Posts: 4
- Joined: Fri Aug 11, 2017 2:33 am
- First Name: John
- Last Name: Engels
- Company Name: BeesdA2 BV
- Contact:
Re: Choice options field
Currently I'm using a select box
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Choice options field
If you wanted to be clever, you could change the font to a fixed-width font, and write a little JavaScript routine to replace the blanks with non-breaking spaces. That would work with a select box, I don't know about other widgets.
For example, for a select box that has an id property of "Dropdown1", I could set the "font family" property to Consolas (which is a fixed-width font):
Then in the "ondbload" function, put the following code:
This runs each time data is loaded from the database, and then replaces all spaces with Unicode U+00A0 characters (which are non-breaking spaces.) As long as you are using a fixed-width font family (such as Consolas in my example) this should allow your data to line up the way you want.
For example, for a select box that has an id property of "Dropdown1", I could set the "font family" property to Consolas (which is a fixed-width font):
Then in the "ondbload" function, put the following code:
Code: Select all
if (response.success) {
var widget_id = response.id;
setTimeout(function() {
var dropdown = getObj(widget_id);
for (var i=0; i<dropdown.options.length; i++) {
dropdown.options[i].innerHTML = dropdown.options[i].innerHTML.replace(/ /g, "\u00A0");
}
}, 1);
}
-
- New User
- Posts: 4
- Joined: Fri Aug 11, 2017 2:33 am
- First Name: John
- Last Name: Engels
- Company Name: BeesdA2 BV
- Contact:
Re: Choice options field
It works now, thanks
Who is online
Users browsing this forum: Google [Bot] and 0 guests