How do I allow spacing between texts displayed in a listbox

0 favourites
  • 9 posts
  • 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.

  • set text to your.value&" "&someother.value&" "&this.value

  • 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.

  • 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"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could make separate text boxes for each.

  • 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.

  • 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.

  • 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

  • newt, thanks a lot! I appreciate your assistance. I will try your suggestions.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)