How do I allow spacing between texts displayed in a listbox

Get help using Construct 2

Post » Fri May 23, 2014 5:54 pm

I am currently working on an invoice program using C2. I would like to display the first order on index 0, followed by the second order on index 1 using a listbox similiar to the following;

Below shows the quantity, item, description and subtotal of each product
1 [space] beer [space] kalik gold [space] $3.00
1 [space] pk cigarette [space] benson & hed [space] $4.50

The problem seems to be that lisboxes do not allow any spacing between text in each of the index. I would grately appreciate if any one can explain or has a solution that will allow me to space items in each index.
B
15
S
2
Posts: 27
Reputation: 1,229

Post » Fri May 23, 2014 6:18 pm

set text to your.value&" "&someother.value&" "&this.value
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Fri May 23, 2014 7:00 pm

@newt- Firstly, thank you for you reply. I should have explained a little better. The problem is when I try to expand the spacing like the following; your.value&" "&someother.value&" "&this.value . It still only defaults to just one spacing. I am not sure if I am making myself clear on this. If I do this in a textbox it works fine.
B
15
S
2
Posts: 27
Reputation: 1,229

Post » Fri May 23, 2014 8:01 pm

You mean you want the index to alternate every other line as empty?
1: some text
2: " "
3: some other text

You would have to do a loop and compare the index to even.
like set text to Vlist index%2=0 ?"space" :"your text"
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Fri May 23, 2014 8:09 pm

You could make separate text boxes for each.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Fri May 23, 2014 10:50 pm

@Tekniko- I need to use listbox because it is easier to take the contents and store them in a database versus taking the value from each textbox.
@newt What I really meant was I need the spacing to be as such;
something.value&[space] [space] [space] &someother.value&[space] [space] [space]&this.value.
I need for the text spacing to be different on each index so that it is aligned properly similiar to an invoice or a receipt.
B
15
S
2
Posts: 27
Reputation: 1,229

Post » Fri May 23, 2014 11:58 pm

You could try css
Property name "wordSpacing"
Value "30px"
That places the words that are in quotes 30 pixels apart.
I wouldn't count on it not resetting in other events.
Keep in mind that's not going to make the text line up in columns.
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Sat May 24, 2014 12:14 am

You other option is to use a third party plug div, or iframe and do it yourself in html:
http://www.w3schools.com/cssref/css3_pr_columns.asp
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Sat May 24, 2014 1:43 am

newt, thanks a lot! I appreciate your assistance. I will try your suggestions.
B
15
S
2
Posts: 27
Reputation: 1,229


Return to How do I....?

Who is online

Users browsing this forum: guannstar, nahima and 20 guests