?
Solved

How can I change the height of a listview header,part3

Posted on 2010-09-16
2
Medium Priority
?
269 Views
Last Modified: 2012-05-10
Hi,

I have asked a couple of question regarding how to change the height
of a listview header. I have received a lot of good solution, but they all
have one minor problem, when the user resizes the columns of the list-
view or resizes the form itself, then the size of the header goes back
to its origal size. I have searched and tried all week to solve this prob-
blem, and I was about to give up. Until I saw  the component Header-
Control on the componentpalet. So I have tried the solution
from jimyX in the question:

http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_26469385.html

Only I use a HeaderControl and a Listview instead of 2 listview.
Now what I have to do is tell the HeaderControl when the user resizes
then the columns of the listview has to resize with it.
Who can help me to solve my last problem regarding the Listview-component.

Greetings, Peter Kiers


Example.jpg
0
Comment
Question by:peterkiers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
jimyX earned 2000 total points
ID: 33694481
Try this
procedure TForm1.HeaderControl1MouseUp(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
 index : integer;
begin
  with ListView1 do
  for Index := 0 to (Columns.Count - 1) do
    ListView1.Column[Index].Width := HeaderControl1.Sections.Items[Index].Width;
end;

Open in new window

0
 
LVL 1

Author Comment

by:peterkiers
ID: 33694825
PERFECT. 500 points are comming to you....

Greetings,

Peter Kiers
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question