How can I make a tree view re-think whether or not a horizontal scroll bar is needed?

前端 未结 1 1020
余生分开走
余生分开走 2021-02-19 05:26

Consider the following very simple unit:

Unit1.pas

unit Unit1;

interface

uses
  Windows, Classes, Controls, Forms, ComCtrls;

type
  T         


        
相关标签:
1条回答
  • 2021-02-19 06:13

    Very simple, use TreeView1.Items.BeginUpdate/EndUpdate methods and the scrollbar will be calculated accordingly.

    like this:

    ...
     TreeView1.Items.BeginUpdate;
     // change your nodes here
     TreeView1.Items.EndUpdate
    
    0 讨论(0)
提交回复
热议问题