{"id":530,"date":"2008-05-10T12:04:09","date_gmt":"2008-05-10T12:04:09","guid":{"rendered":"http:\/\/6teen.ru\/?p=392"},"modified":"2008-05-10T12:04:09","modified_gmt":"2008-05-10T12:04:09","slug":"4941","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=530","title":{"rendered":"\u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440"},"content":{"rendered":"<p>\u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 stringgrid (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 combobox)\n\nprocedure TForm1.FormCreate(Sender: TObject);\nbegin\n  {\u0412\u044b\u0441\u043e\u0442\u0443 combobox'\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0448\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e combobox'\u0430\n     \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 grid'\u0430 !}\n  StringGrid1.DefaultRowHeight := ComboBox1.Height;\n  {\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c combobox}\n  ComboBox1.Visible := False;\n  ComboBox1.Items.Add('Delphi Kingdom');\n  ComboBox1.Items.Add('\u041a\u043e\u0440\u043e\u043b\u0435\u0432\u0441\u0442\u0432\u043e \u0414\u0435\u043b\u044c\u0444\u0438');\nend;\n\nprocedure TForm1.ComboBox1Change(Sender: TObject);\nbegin\n  {\u041f\u0435\u0440\u0435\u0431\u0440\u043e\u0441\u0438\u043c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 ComboBox \u0432 grid}\n  StringGrid1.Cells[StringGrid1.Col,\n  StringGrid1.Row] :=ComboBox1.Items[ComboBox1.ItemIndex];\n  ComboBox1.Visible := False;\n  StringGrid1.SetFocus;\nend;\n\nprocedure TForm1.ComboBox1Exit(Sender: TObject);\nbegin\n  {\u041f\u0435\u0440\u0435\u0431\u0440\u043e\u0441\u0438\u043c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 ComboBox \u0432 grid}\n  StringGrid1.Cells[StringGrid1.Col,\n  StringGrid1.Row] :=ComboBox1.Items[ComboBox1.ItemIndex];\n  ComboBox1.Visible := False;\n  StringGrid1.SetFocus;\nend;\n\nprocedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol,\n          ARow: Integer; var CanSelect: Boolean);\nvar\n  R: TRect;\nbegin\n  if ((ACol = 3) AND (ARow <> 0)) then\n    begin\n      {\u0428\u0438\u0440\u0438\u043d\u0430 \u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 ComboBox \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\n                \u044f\u0447\u0435\u0439\u043a\u0435 StringGrid}\n      R := StringGrid1.CellRect(ACol, ARow);\n      R.Left := R.Left + StringGrid1.Left;\n      R.Right := R.Right + StringGrid1.Left;\n      R.Top := R.Top + StringGrid1.Top;\n      R.Bottom := R.Bottom + StringGrid1.Top;\n      ComboBox1.Left := R.Left + 1;\n      ComboBox1.Top := R.Top + 1;\n      ComboBox1.Width := (R.Right + 1) - R.Left;\n      ComboBox1.Height := (R.Bottom + 1) - R.Top;\n      {\u041f\u043e\u043a\u0430\u0436\u0435\u043c combobox}\n      ComboBox1.Visible := True;\n      ComboBox1.SetFocus;\n    end;\n  CanSelect := True;\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[568,386],"tags":[1260,1482,1570,310],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/530"}],"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=530"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}