Вниз
Скачать: 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.44 MB
Время: 0.026 c
8-1101721670
DDDeN
2004-11-29 12:47
2005.03.20
Stereo Out загнать в сетевой поток


14-1109327484
Anatoly Podgoretsky
2005-02-25 13:31
2005.03.20
Какой злой сегодня Error 500


14-1109577722
Чеширский_Кот
2005-02-28 11:02
2005.03.20
Пол Маккартни


1-1110009333
Гость
2005-03-05 10:55
2005.03.20
Компонент "Object Inspector"


1-1109713172
Vladimir1
2005-03-02 00:39
2005.03.20
передача текста




   Наверх