I would like to instead of placing text in to the header of a column in a
windows.forms.datagrid
to place an image instead. Can it be done? Googling doesn't seem to come up
with anything like this
except for creation of an image column style, which is close to what I want
but not quite close enough
(as I actually want the column to contain checkboxes).
On another similar note is it possible to have multi-line column headers,
where the header could wrap in accordance with the
width of the column so you can always read what it says (more or less)?
Anyone got any ideas.
cheers
H
Phew...it should be possible but would require much effort. You should
override the OnPaint method (or handle the Pain event) of the DataGrid
control and provide manual painting for the column header you want to
customize.
Another challenge you are likely to encounter is determining the bounds of
the column header. While it is relatively easy task when a data cell is in
question (the grid exposes a GetCellBounds method), I am not so sure a
similar method exists for the headers.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"harry" <thedrea...@hotmail.com> wrote in message
news:N8vWb.285$oI1...@news-binary.blueyonder.co.uk...
H
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!