esemmoc
asked on
Change listbox row thickness
Is there a way to change the thickness of the lines that show in a listbox control? I want to make them lighter.
Thanks.
Thanks.
Check out this link:
http://stackoverflow.com/questions/5663735/draw-listbox-item-properly-vb-net-2005
http://stackoverflow.com/questions/5663735/draw-listbox-item-properly-vb-net-2005
try it out whether this inline css helps u
<select style="width: 100px;"></select>
ASKER
I am using vb.net and tried the below solution but it doesn't seem to change the display.
by: Medo3337Posted on 2013-01-26 at 05:48:08ID: 38822094
Check out this link:
http://stackoverflow.com/questions/5663735/draw-listbox-item-properly-vb-net-2005
e.Graphics.DrawRectangle(m yPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width-1,e.Bounds. Height)
My code:
e.Graphics.DrawRectangle(m yPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width-1,e.Bounds. Height)
e.Graphics.DrawString(lstS hipping.It ems(e.Inde x).ToStrin g, txtfnt, txtBrush, R)
On further thought, is it possible to remove the lines completely, e.g. go from a "ruled" listbox to an "unruled" listbox?
by: Medo3337Posted on 2013-01-26 at 05:48:08ID: 38822094
Check out this link:
http://stackoverflow.com/questions/5663735/draw-listbox-item-properly-vb-net-2005
e.Graphics.DrawRectangle(m
My code:
e.Graphics.DrawRectangle(m
e.Graphics.DrawString(lstS
On further thought, is it possible to remove the lines completely, e.g. go from a "ruled" listbox to an "unruled" listbox?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great. I used e.Graphics.DrawRectangle(P ens.LightG ray, e.Bounds) to "soften" the lines displayed. To completely remove the lines (an affect I tried but didn't like) just make the "Pens.xxxx" the same color as the color in the e.Graphics.FillRectangle statement.
Thanks.
Thanks.
Open in new window