Reading through the forum, I see several entries that suggest that the column widths work for WEBLISTBOX - however those could be older versions.
Am I doing something wrong, does the WebListbox work for setting column widths?
I’ve tried putting the values in the properties, shownEvent, and in code.
Me.ColumnWidths = “5,5,100”
This is a bug in the WebListBox. It’s been marked as reproducible in Feedback, but has not been addressed as of yet.
Just in case you’re looking for an alternative to the built-in WebListBox with tons of features, there’s always GraffitiGrid for Web.
Thank you Anthony. I’m aware of GraffitiSuite, but it’s really expensive for me for just a listbox. I know it would get the job done and the suite looks really good. But for what I do, it’s hard for me to justify the expense.
Would you happen to know of any others for web? for example just a weblistbox so I don’t have to purchase a bunch of objects I won’t ever use?
Again thanks for confirming that it does not currently work.
Just for clarity, the columns of the WebListBox will currently fix the contents, so if you had two pictures followed by text, the text column would do its best to fit the longest line.
That said, in the web world it’s unlikely that you’ll get a column width of 5px with the padding that’s automatically applied.
I won’t get in to the merits of the over 50+ other components you get with the Suite, but the short answer would be no, I don’t know of any others.
5px was just randomly picked for an example. Greg, are you saying that the column will always be set to the width of text regardless? One of the features I like to put in for user apps is remembering the width, order, and sortOrder of columns they have selected. I store that in the database and when the user launches again, I will restore their settings.
Many times a user might pull the width over the data so they can see just a few characters of a column. Also (at least in desktop versions) it’s easier to ‘hide’ a column by just setting it’s width to zero (means the user does not want to see the column) and for me it makes the coding much easier and for the user makes the GUI faster. If they choose to show the column again, the column width is just changed back. Very fast.
I purchased the GraffitiSuite for it’s grid control.
Is there a way to turn on a horizontal scrollbar and have the sum of the column widths wider than the width of the screen?
You should review the documentation and example project. There’s a lot to take in.
You’ll want to set the ForceFitColumns property to False then define widths how you want them on each column when creating the GraffitiGridColumn instance. You can define columns as either having a pixel or percentage width using the WidthType property of a column with the WidthTypes enumeration.
I also ask that you open tickets via the support system for questions, requests, or issues. I rely on it heavily to keep up with my work.
Well - I have no idea why the first several hours produced no results. I did read the documentation and look at the examples. Although I didn’t find the scrollbar example specifically I assumed I knew enough to make it work. I must have missed a setting somewhere and reset it subconsciously. As soon as I read your post and set a font size - and tried it again, the columns started resizing as I expected but still no horizontal scrollbar. I’ll use the support ticket system in the future. Thanks.