Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8030549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:48:22+00:00 2026-06-05T00:48:22+00:00

I’ve been playing around with TListView and have been trying to work out how

  • 0

I’ve been playing around with TListView and have been trying to work out how WorkAreas work, and what they are useful for. There seems to be very little documentation (big surprise) on it.

Has anyone successfully used WorkAreas?
If so what for?

I have been trying things like the following:

  wa := ListView1.WorkAreas.Add;
  wa.DisplayName := 'Work Area 0';
  wa.Rect.Width := ListView1.Width div 2;
  wa.Rect.Height := ListView1.Height;

which seems to create a work area region, and you can determine if an item is associated with that work area by checking its WorkArea property.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:48:24+00:00Added an answer on June 5, 2026 at 12:48 am

    It is the VCL’s support for the native List-View control’s Working Areas. See List-View Working Areas. The documentation gives an example for what they can be used for:

    […] Multiple working areas can be used for creating different areas
    within one view. You can create areas in a single view that have
    different meanings. For example, a view of a file system might have an
    area for read/write files and another area for read-only files. The
    user can categorize items by placing them in different working areas.
    […]

    The documentation also mentions that you can create empty borders near edges or cause scroll bars where normally none would be by using work areas.

    There doesn’t seem to be much missing from VCL’s documentation. You can add and query work areas. Relocate an item to a particular work area, or ask it in what work area it lives. Nothing is automatic, all you have to do it yourself. An item is not associated with a work area, you have to move it yourself (VCL just iterates over work areas and checks coordinates of the item and the area to find the work area an item is in).

    The categorization part is not probably extremely useful, as one can keep his/her own virtual regions without the help of the control itself. The bits about edges and scroll bars are probably more important. But I’ve never seen such thing implemented in an application, including the OS itself.


    Sample usage for layout control:

    type
      TForm1 = class(TForm)
        Button1: TButton;
        ListView1: TListView;
        procedure Button1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    uses
      commctrl;
    
    {$R *.dfm}
    
    procedure TForm1.FormCreate(Sender: TObject);
    var
      R1, R2: TRect;
    begin
      R1 := Rect(0, 0,
                  ListView1.ClientWidth div 2, ListView1.ClientHeight div 2 + 10);
      R2 := Rect(ListView1.ClientWidth div 2 + 1, 0,
                  ListView1.ClientWidth - 1, ListView1.ClientHeight div 2 + 10);
    
      ListView1.WorkAreas.Add.Rect := R1;
      ListView1.WorkAreas.Add.Rect := R2;
    
      ListView1.AddItem('Item 1', nil);
      ListView1.AddItem('Item 2', nil);
      ListView1.AddItem('Item 3', nil);
      ListView1.AddItem('Item 4', nil);
      ListView1.AddItem('Item 5', nil);
    end;
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i: Integer;
    begin
      for i := 0 to ListView1.Items.Count - 1 do begin
        ListView1.Items[i].Left := ListView1.WorkAreas[1].Rect.Left;
        ListView1.Items[i].Top := ListView1.WorkAreas[1].Rect.Top;
      end;
      ListView1.Arrange(arAlignTop);
    end;
    

    Initial view:
    enter image description here

    After pressing the button:
    enter image description here

    Note that in the first picture “Item 5” is not in any work area. In the button click handler I tried to put all of the five items in the ‘right-top’ work area. After “Item 5” is put there, the control has decided to kick out “Item-1” since all five did not fit. It should be evident by now that I’ve never used work areas, but I purposefully gave this example to be able to point possible quirks. What I expected was that a scrollbar to appear as mentioned in the documents.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.