Procedure TTreeViewForm.FormShow(Sender: TObject); begin ifFileExists(ExtractFilePath (Application.ExeName) +'tree.dat') then TreeViewl.LgadFromFile(ExtractFilePath(AppUcation. ExeName) +'tree.dat'); end; Oldin FileExists funksiyasi yordamida fayl mavjudligi tekshiriladi.
Agar mavjud bo‘lsa LgadFromFile usuli chaqiriladi.
i
E
-
9 8x01-3iJK
9
206
Elementlar ro‘yxati (TListView) W IN 32-sahifasiga tegishli keyingi komponent Windows
«IIp0B0AHHK» oynasining o‘ng tomoniga o‘xshagan ro‘yxatni aks
ettirishga imkon beradi.
Bu komponentadan foydalanishni amaliy misolda ko‘rib chiqamiz.
Sodda fayl menedjeri Loyiha formasiga bitta buyruq tugmasi, kiritish qatori va elementlar
ro‘yxatini o‘rnating.
| ' npn ic p p tfo iM i iiiio»w
Dastur uses bolimiga shellapi modulini qo‘shing.
Formaning OnCreate hodisasi uchun quyidagi protsedurani yozing:
Procedure TForml.FormCreate(Sender: TObject); var SysImageList: uint; SFI: TSHFilelnfo; begin ListViewl.Largelmages:=TImageList. Create(self); ListViewl.SmallImages:=TImageList. Create(self); SysImageList := SHGetFileInfo(", 0, SFI, SizeOf(TSHFilelnfo), SHGFI_SYSICONINDEX or