Вниз
Скачать: 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.017 c
15-1207163877
korneley
2008-04-02 23:17
2008.05.18
Максиму Пешкову посвящается


2-1208406785
TPopupActionBarEx
2008-04-17 08:33
2008.05.18
Креатим в рантайме, как избавится от ошибки?


2-1208518214
lewka-serdceed
2008-04-18 15:30
2008.05.18
Не понятные символы в строке


9-1170231355
akaValerius
2007-01-31 11:15
2008.05.18
Указатель на часть массива


15-1207322240
PZ
2008-04-04 19:17
2008.05.18
Microsoft провалил продажи Windows Vista




   Наверх