IonicWind Software

IWBasic => General Questions => Topic started by: arono on January 11, 2017, 02:43:18 PM

Title: how to code columns in a listbox
Post by: arono on January 11, 2017, 02:43:18 PM
Hi,

I have created a listbox Control and it works fine.  Now I would like to change it to contain two columns.  Looking at the docs there isn't much on this.  I understand that the @CTLISTCOLUMNS attribute needs to be added to the Control statement, the SETLBCOLWIDTH is used to set the width and ADDSTRING is used to add entries to the listbox.

My questions are:
   - How do I indicate that I want 2 columns?
   - How do I indicate the width for each of the columns?
   - How do I use ADDSTRING to add two columns of data for the entries in the listbox?

Thanks for your help, again.
Title: Re: how to code columns in a listbox
Post by: billhsln on January 11, 2017, 03:56:39 PM
I think you should look at LISTVIEW, not LISTBOX.  LISTVIEW allows more than 1 column of data.

Bill
Title: Re: how to code columns in a listbox
Post by: Brian on January 12, 2017, 05:44:39 AM
Here's a multi-column listbox for you to look at (attached)

Brian
Title: Re: how to code columns in a listbox
Post by: arono on January 12, 2017, 08:19:02 AM
Thanks Bob and Bill,

I'll look into your suggestions.
Title: Re: how to code columns in a listbox
Post by: Brian on January 12, 2017, 09:28:54 AM
Bob ?!?!
Title: Re: how to code columns in a listbox
Post by: LarryMc on January 12, 2017, 09:45:09 AM
Quote from: Brian Pugh on January 12, 2017, 09:28:54 AM
Bob ?!?!
Hey, I get Tim all the time because my email starts tlmcc.
Besides, Brian looks a lot like Bob anyways .....lol!

Title: Re: how to code columns in a listbox
Post by: billhsln on January 12, 2017, 10:43:17 AM
To Brian Pugh (Bob?),

Very cool, I did not know that ListBox could do that.  Is the 'SETLBCOLWIDTH d1,1,85' line what allows the columns?

Thanks,
Bill
Title: Re: how to code columns in a listbox
Post by: Brian on January 12, 2017, 11:12:11 AM
Billy Bob,

From the IWB Help file:
Sets the width in pixels of columns in a multi-column list box. A multi-column list box has fixed column widths

If you create a list box in the dialog editor, you can set a flag to create a multi column list box

Brian Bob