开发者

C# ListBox bug in ColumnWidth

开发者 https://www.devze.com 2023-01-30 14:20 出处:网络
When i use listbox in c# (vs 2010 without SP1 Beta) with this setting: MultiColumn = tru开发者_开发问答e

When i use listbox in c# (vs 2010 without SP1 Beta) with this setting:

MultiColumn = tru开发者_开发问答e 

and

RightToLeft = System.Windows.Forms.RightToLeft.Yes

and

ColumnWidth = 78 // 1 to 78 

c# ignore

RightToLeft = System.Windows.Forms.RightToLeft.Yes

and show from left side. like RightToLeft = System.Windows.Forms.RightToLeft.No

but when i use

ColumnWidth = 79 // 0 or greater than 78

that show correct.

Can anyone help?


I can't say I see any difference between 78 and 79. Your code is hard to interpret, RightToLeft is not a boolean property. It does look iffy, the 2nd column doesn't seem to be properly aligned. Not sure, you didn't mention your Windows version either.

Solve you problem by drawing the listbox content yourself. Use the DrawItem event, there's a good example in the MSDN Library article for it.

0

精彩评论

暂无评论...
验证码 换一张
取 消