![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Указатели [D6, WinXP]
webpauk © (2005-03-04 19:01:00)Есть
fArray array of tcontrols;
Tcontrol - любой объект
как сделать указатель Items на farray, чтобы в нем показывались только (Tcontrol as TmainMenu), например
Defunct (2005-03-04 19:11:00) [1]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)
clickmaker (2005-03-04 19:06:00) [2]
> webpauk (04.03.05 19:01)
у массивов нет встроенных механизмов фильтрации. Руками