A
--== Alain ==--
Hi,
I have some little issue when i want to redraw the columnHeader of my
ListView.
Basically i display a little arrow to show the sortOrder of each column.
For sure only the clicked column is sorted.
here is my code located in OnDrawColumnHeader overriden method:
....
if(e->ColumnIndex == this->m_LastClickedColumn)
{
if (this->Sorting == SortOrder::Ascending)
{
e->Graphics->DrawString("t", ArrowFont,
System:rawing::SystemBrushes::ControlDarkDark, arrowRect, strForm);
}
else if (this->Sorting == SortOrder:escending)
{
e->Graphics->DrawString("u", ArrowFont,
System:rawing::SystemBrushes::ControlDarkDark, arrowRect, strForm);
}
}
else
{
e->Graphics->DrawString(" ", ArrowFont,
System:rawing::SystemBrushes::ControlDarkDark, arrowRect, strForm);
}
....
unfortunately, the arrow is drawn correctly in the clicked column, but
if arrow was drawn in some other column, it does not disappear after 1
click...
for example :
i click column header 2 (arrow is on column header 2)
i click column header 1 (arrow is on column header 1 and still drawn on
column header 2)
i click again on column header 1 (arrow only appear on column header 1
and nowhere else)...
where could be the problem ?
I have the feeling that component does not redraw all column
headers...but only the ones which are close to the one i clicked..
Alain
I have some little issue when i want to redraw the columnHeader of my
ListView.
Basically i display a little arrow to show the sortOrder of each column.
For sure only the clicked column is sorted.
here is my code located in OnDrawColumnHeader overriden method:
....
if(e->ColumnIndex == this->m_LastClickedColumn)
{
if (this->Sorting == SortOrder::Ascending)
{
e->Graphics->DrawString("t", ArrowFont,
System:rawing::SystemBrushes::ControlDarkDark, arrowRect, strForm);
}
else if (this->Sorting == SortOrder:escending)
{
e->Graphics->DrawString("u", ArrowFont,
System:rawing::SystemBrushes::ControlDarkDark, arrowRect, strForm);
}
}
else
{
e->Graphics->DrawString(" ", ArrowFont,
System:rawing::SystemBrushes::ControlDarkDark, arrowRect, strForm);
}
....
unfortunately, the arrow is drawn correctly in the clicked column, but
if arrow was drawn in some other column, it does not disappear after 1
click...
for example :
i click column header 2 (arrow is on column header 2)
i click column header 1 (arrow is on column header 1 and still drawn on
column header 2)
i click again on column header 1 (arrow only appear on column header 1
and nowhere else)...
where could be the problem ?
I have the feeling that component does not redraw all column
headers...but only the ones which are close to the one i clicked..
Alain