1 Attachment(s)
Need help on CheckedListboxEx Draw problem
Hi,
I managed to create CheckedListbox class with Textbox support but now I hit one problem with refreshing list when Scrollbar clicked and textbox item drawn in correct place and addidtionaly has some shadow in the wrong place .
I've attached testing project. To see this strange problem click on scrolbar down to see two textboxes instead one. Invalid textbox will dissapear and the right one remain if mouse hovered over any item of listbox. Clicking scroll up and down to see the problem again.
Any ideas?
http://imgur.com/Torpl.png
Re: Need help on CheckedListboxEx Draw problem
Re: Need help on CheckedListboxEx Draw problem
No even single answer.... :(
Re: Need help on CheckedListboxEx Draw problem
I'm not sure I see a need for your control. Why not just use a DataGridView? One check box column, one read-only text box column and one read/write text box column.
Re: Need help on CheckedListboxEx Draw problem
Not enough space for datagrid as some listbox'es are just two rows height only.
Well then I have another question: how to catch scroll bar click event in listbox? Then I could force to redraw listbox items properly.
Re: Need help on CheckedListboxEx Draw problem
A general description of what you are trying to accomplish would be helpful. Expecting someone to download your code and infer your intent may not work out for you.
Re: Need help on CheckedListboxEx Draw problem
Quote:
Originally Posted by
Tomazas
Not enough space for datagrid as some listbox'es are just two rows height only.
If there's enough room for a ListBox then there's enough room for a DataGridView. If there's only two items visible in your ListBox then there would be only two rows visible in the DataGridView. Perhaps you mistakenly believe that the column and row headers must always be visible. There are properties available in the Properties window to hide them both, so the grid displays nothing but your data.