Howto Use TOpenDialog/ja: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Howto Use TOpenDialog/ja
| Old | New | Line | |
|---|---|---|---|
| 1 | + | TOpenDialog の使い方 | |
| 2 | + | ||
| 3 | + | <figure> | |
| 4 | + | <img src="topendialog.png" title="topendialog.png" /> | |
| 5 | + | <figcaption>topendialog.png</figcaption> | |
| 6 | + | </figure> | |
| 7 | + | ||
| 8 | + | 簡単な説明: | |
| 9 | + | ||
| 10 | + | 1\. OpenDialogをFormに配置します。(アイコンは実行時には表示されませんので、Form上のどこにおいても大丈夫です。) | |
| 11 | + | ||
| 12 | + | ` `\ | |
| 13 | + | ` (OpenDialogは「Dialog」タブの左端)` | |
| 14 | + | ||
| 15 | + | 2\. 下記を参考にコーディングします。 | |
| 16 | + | ||
| 17 | + | ``` pascal | |
| 18 | + | var filename : string; | |
| 19 | + | ||
| 20 | + | if OpenDialog1.Execute then | |
| 21 | + | begin | |
| 22 | + | filename := OpenDialog1.Filename; | |
| 23 | + | ShowMessage(filename); | |
| 24 | + | end; | |
| 25 | + | ``` | |
| 26 | + | ||
| 27 | + | [[doc:lcl/dialogs/tcommondialog.execute.html|Executeメソッドによりファイルを]]開くダイアログが表示されます。 ファイルが選ばれたときは [[True|true]] が返り値となり、キャンセルしたときは [[False|false]] が返り値となります。 | |
| 28 | + | ||
| 29 | + | [[doc:lcl/dialogs/tfiledialog.filename.html|Filenameプロパティは]]、 ドライブ名とパスを含んだファイル名(ファイルへのフルパス)を返り値とします。 | |
| 30 | + | ||
| 31 | + | ## 関連項目 | |
| 32 | + | ||
| 33 | + | - [[Howto Use TSaveDialog/ja|TSaveDialog の使い方]] | |
| 34 | + | - [[Dialogs tab/ja|Dialogs タブ]] | |
| 35 | + | ||
| 36 | + | --- | |
| 37 | + | *From the Free Pascal wiki, page "Howto Use TOpenDialog/ja", as it stood on 2020-02-17 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
