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

Указатели   Найти похожие ветки 

 
webpauk   (2005-03-04 19:01) [0]

Есть fArray array of tcontrols;

Tcontrol - любой объект
как сделать указатель Items на farray, чтобы в нем показывались только (Tcontrol as TmainMenu), например


 
clickmaker ©   (2005-03-04 19:06) [1]


> webpauk   (04.03.05 19:01)

у массивов нет встроенных механизмов фильтрации. Руками


 
Defunct ©   (2005-03-04 19:11) [2]

TControlList = class(TControl)
private
  fControls : Array of TControl;
 
  procedure SetItem(const Index: integer; AControl: TControl);
  function  GetItem(const Index: integer);

public
  property Items[Index : integer]:TControl read GetItem write SetItem;
 
end;

var
 Controls : TControlList;

begin
  Controls := TControlList.Create;
  ...

Вот, и в функции GetItem выбирать только те Control"ы которые (is TMainMenu)



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

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



Память: 0.45 MB
Время: 0.048 c
1-1110129911
ser35
2005-03-06 20:25
2005.03.20
DBEdit как Maskedit


14-1109513422
GanibalLector
2005-02-27 17:10
2005.03.20
Толковый словарь (ОЧЕПЯТКИ)


3-1108849037
table refrash
2005-02-20 00:37
2005.03.20
Как обновить данные в таблице в IB


1-1109945501
andrey__
2005-03-04 17:11
2005.03.20
TDBGrid - свойство FixedCols


14-1109401243
boriskb
2005-02-26 10:00
2005.03.20
Намедни был на концерте С. Альтова.




   Наверх