{"id":263,"date":"2008-05-09T07:17:11","date_gmt":"2008-05-09T07:17:11","guid":{"rendered":"http:\/\/6teen.ru\/?p=40"},"modified":"2008-05-09T07:17:11","modified_gmt":"2008-05-09T07:17:11","slug":"9820","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=263","title":{"rendered":"Thumbinals &#8212; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u044d\u0441\u043a\u0438\u0437\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439"},"content":{"rendered":"<p>Thumbinals &#8212; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u044d\u0441\u043a\u0438\u0437\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>Thumbinals - \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u044d\u0441\u043a\u0438\u0437\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439\n\nSnowy\n\n\u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0443\u0436\u043d\u043e:\n1. \u0411\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 TListView\n2. \u0411\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 TImageList\n3. \u0423 TImageList \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 Width \u0438 Height \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u044d\u0441\u043a\u0438\u0437\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 64 \u0438 64)\n4. \u0423 TListView \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 LageImages, \u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 TImageList\n\n\u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:\n\nuses jpeg{, GifImage}{, PngImage};\n\nprocedure FillListView(path: string; mask: string = '*.jpg');\nvar\n  sr:  TSearchRec;\n  img: TPicture;\n  bmp: TBitmap;\n  pic: TBitMap;\nbegin\n  img := TPicture.Create;\n  bmp := TBitMap.Create;\n  pic := TBitMap.Create;\n  With Form1 do\n  if FindFirst(path + mask, $20, sr) = 0 then\n  begin\n    repeat\n      if (sr.Attr and $20) = $20 then\n      begin\n        try\n          img.LoadFromFile(path + sr.Name);\n        except\n          Continue;\n        end;\n        bmp.Assign(img.Graphic);\n        pic.Width := ImageList1.Width;\n        pic.Height:= ImageList1.Height;\n        pic.Canvas.StretchDraw(Rect(0,0,pic.Width, pic.Height), bmp);\n        ImageList1.Add(pic, nil);\n        with ListView1.Items.Add do begin\n          Caption := sr.Name;\n          ImageIndex := ListView1.Items.Count-1;\n        end;\n      end;\n    until FindNext(sr) <> 0;\n    FindClose(sr);\n  end;\n  img.Free; bmp.Free; pic.Free;\nend;\n\n\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0441\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:\n\nprocedure TForm1.Button1Click(Sender: TObject);\nbegin\n  Form1.ListView1.Clear;\n  FillListView('C:\\', '*.jpg');\n  FillListView('C:\\', '*.bmp');\n  \/\/FillListView('C:\\', '*.gif'); \/\/ \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 TGifImage\n  \/\/FillListView('C:\\', '*.png'); \/\/ \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 TPngImage\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thumbinals &#8212; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u044d\u0441\u043a\u0438\u0437\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[410,386],"tags":[579,763,298,1061],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/263"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=263"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}