Вниз
Скачать: CL | DM;

Как удалить полосы прокрутки в компоненте treeview?   Найти похожие ветки 

 
VictoR407   (2008-04-17 13:46) [0]

Ввожу длинное имя ветки в treeview. Появляются полосы прокрутки. После ввожу короткое имя ветки. Полося прокрутки не исчезают. Как полосы скрыть?


 
Kolan ©   (2008-04-17 14:11) [1]

Я делал так:

unit KNoHScrollTreeView;

interface

uses
 Windows, SysUtils, Classes, Controls, ComCtrls, Messages;

type
 TNoHScrollTreeView = class(TTreeView)
 private
   { Private declarations }
 protected
   { Protected declarations }
   procedure WMNCCalcSize(var msg: TMessage); message WM_NCCALCSIZE;
 public
   { Public declarations }
 published
   { Published declarations }
 end;

procedure Register;

implementation

procedure Register;
begin
 RegisterComponents("KSoftWare", [TNoHScrollTreeView]);
end;

{ TNoHScrollTreeView }

procedure TNoHScrollTreeView.WMNCCalcSize(var msg: TMessage);
var
Style: Integer;
begin
 Style := GetWindowLong(Handle, GWL_STYLE );
 if (Style and WS_HSCROLL) <> 0 then
   SetWindowLong(Handle, GWL_STYLE, style and not WS_HSCROLL);
inherited;
end;

end.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.013 c
2-1208508202
umbra
2008-04-18 12:43
2008.05.18
как запихнуть данные в базу? :)


15-1207627627
TUser
2008-04-08 08:07
2008.05.18
Настоящий дистрибутив ХР влезает на дискету :)


2-1208350222
Апостля
2008-04-16 16:50
2008.05.18
буфер. ричедит.


11-1189432628
vampir_infernal
2007-09-10 17:57
2008.05.18
Int2Str и UNICODE_CTRLS


15-1207018692
X9
2008-04-01 06:58
2008.05.18
Розыгрыши на 1 апреля




   Наверх