 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dave Speight Guest
|
Posted: Tue Aug 26, 2003 9:31 am Post subject: TListView header repaint |
|
|
Does anyone know how to force the column headers in a detail style listview to repaint?
Refresh, .Repaint, .Update don't do it (just seem to do client area). Playing with ShowColumnHeaders didn't do it.
Maybe there's a HDN_XXX message to send?
I have a derived auto-rescaling listview component, and when the containing form is shown sometimes the column header is just painted as a grey rectangle, the only way to get it to show the contents is to force a repaint by dragging the window off and on the screen etc, or clicking the dividers between columns seems to repaint the header of the column to the left so it must be possible to trick it somehow...
|
|
| Back to top |
|
 |
Yorai Aminov (TeamB) Guest
|
Posted: Tue Aug 26, 2003 10:53 am Post subject: Re: TListView header repaint |
|
|
On 26 Aug 2003 02:31:22 -0700, "Dave Speight"
<entrypoint (AT) totalise (DOT) co.uk> wrote:
| Quote: | Refresh, .Repaint, .Update don't do it (just seem to do client area).
|
I haven't tested it with a list view's header, but you can repaint a
window's non-client area using SetWindowPos:
SetWindowPos(Handle, 0, 0, 0, 0, 0, SWP_DRAWFRAME or SWP_NOACTIVATE or
SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER);
---
Yorai Aminov (TeamB)
http://develop.shorterpath.com/yorai
(TeamB cannot answer questions received via email.)
|
|
| Back to top |
|
 |
Dave Speight Guest
|
Posted: Tue Aug 26, 2003 11:11 am Post subject: Re: TListView header repaint |
|
|
Didn't work, but started me on a trail through API help where I found solution:
procedure TRescaleListView.RLVMDoneResize(var Msg: TMessage);
var
h: THandle;
begin
h := GetDlgItem(Handle, 0);
if (h <> 0) then
InvalidateRect(h, nil, True);
end;
in response to a message sent after my special resize stuff.
Thanks for the help
Dave
"Yorai Aminov (TeamB)" <yaminov (AT) delete_shorterpath (DOT) com> wrote:
| Quote: | On 26 Aug 2003 02:31:22 -0700, "Dave Speight"
[email]entrypoint (AT) totalise (DOT) co.uk[/email]> wrote:
Refresh, .Repaint, .Update don't do it (just seem to do client area).
I haven't tested it with a list view's header, but you can repaint a
window's non-client area using SetWindowPos:
SetWindowPos(Handle, 0, 0, 0, 0, 0, SWP_DRAWFRAME or SWP_NOACTIVATE or
SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER);
---
Yorai Aminov (TeamB)
http://develop.shorterpath.com/yorai
(TeamB cannot answer questions received via email.)
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|