Difference between revisions of "Component Palette/ja"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "<noinclude>{{Component Palette}}</noinclude> {{Japanese Menu}} '''コンポーネントパレット'''(IDEにある)はフォームを構築する際に主に用いら...")
 
Line 2: Line 2:
  
 
{{Japanese Menu}}
 
{{Japanese Menu}}
 
  
 
'''コンポーネントパレット'''([[IDE]]にある)はフォームを構築する際に主に用いられるコンポーネントを表す、数多くのアイコンが並べられたツールバーである。
 
'''コンポーネントパレット'''([[IDE]]にある)はフォームを構築する際に主に用いられるコンポーネントを表す、数多くのアイコンが並べられたツールバーである。
Line 10: Line 9:
 
{{NavComponentPalette}}
 
{{NavComponentPalette}}
  
Each tab causes the display of a different set of icons, representing a functional group of components.  The left-most icon in each tabbed group is an obliquely leftward-facing arrow, called the Selection Tool.
+
それぞれのタブはコンポーネントの機能的なグループを表す、異なるアイコンセットを表示する。それぞれのタブグループのもっとも左のアイコンは、セレクションツールと呼ばれる左斜めに傾いた矢印である。
  
If you allow the mouse cursor to hover over any of the icons on the Component Palette, without clicking on the icon, the title of that component will pop-up.  Note that each title begins with a 'T' - this signifies 'Type' or more accurately 'Class' of the component.  When you select a component for inclusion in a form, the [[Class]] is added to the ''' [[Type|type]] ''' section of the  ''' [[Interface|interface]] ''' part of the [[Unit]] (usually as part of the overall TForm1), and an  ''' instance ''' of that class is added to the  ''' [[Var|var]] ''' section (usually as the variable Form1).  Any  ''' [[Method]]s '''  that you design to be used by the Form or its Components (ie [[Procedure]]s or [[Function]]s) will be placed in the  ''' [[Implementation|implementation]] ''' part of the Unit.
+
アイコンをクリックせずにコンポーネントパレット上の、どのアイコンにマウスカーソルをかざしても、コンポーネントの名称がポップアップする。それぞれの名称はTで始まっており、これは「Type」、より正確に言えばそのコンポーネントの「クラス」を表していることに注意すること。フォームに含めるためにコンポーネントを選択すると、[[Unit]](通常はTForm1全体の部分)の'''[[Interface|interface]]'''''' [[Type|type]] '''セクションに[[Class]]が追加され、そしてそのクラスの'''instance'''(インスタンス)が''' [[Var|var]] '''セクション(通常は変数Form1として)に追加される。Form、あるいはそのコンポーネント(即ち、[[Procedure]](プロシージャ)または[[Function]](関数))によって用いられるために設計されたどの''' [[Method]]s '''(メソッド)もユニットの''' [[Implementation|implementation]] '''(実装部)に置かれる。
  
==== How To Use the Palette ====
+
==== パレットの用い方 ====
To use the palette, there must be an open form on view in the editor (if there isn't one, select File -> New Form). Click on the icon in the appropriate tab of the palette for the component you want to use, then click on the form, near where you want the component to appear. When the desired component appears, you can select it by clicking with the mouse. Once selected on the form, the object is also selected in the Object Inspector window, where you can edit its properties and events.
 
  
Adjustments to the visual appearance of an object can be made either by altering the picture itself on the Form using the mouse, or by changing the relevant Property in the Object Editor for that component.
+
パレットを用いるには、エディタのヴューに空きフォームがなければならない(もしなければ、ファイル -> 新規フォーム、を選択する)。使いたいコンポーネントを含む相応のアイコンをクリックし、フォーム上のコンポーネントを現したい付近をクリックする。望むコンポーネントが現れたら、マウスでそれをクリックすることで選択できる。ひとたびフォーム上で選択されれば、そのオブジェクトは、プロパティとイベントを編集できるオブジェクトインスペクタウィンドウでも選択できる。
  
If you install additional components, either those you have written yourself, or some coming as a package from some other source, then extra tabs with the relevant icons will appear in your Component Palette. These new components can be selected and used on your forms in the same way as those supplied by default.
+
オブジェクトの外観を調整するには、マウスを用いてフォーム上の画そのものを変える、あるいはそれに対するプロパティをそのコンポーネントに対するオブジェクトエディタで調整することもできる。
  
In the following list of the Components, you will find links to files that contain descriptions of the Units in which they are found.  If you want to find out about the properties of a particular component, it is often worth looking at the Inheritance of that component and then inspecting the properties of the base type from which it is derived.  For example, to understand [[TMaskEdit]] it is also useful to examine [[TCustomMaskEdit]].
+
もし、自分自身で作った、あるいは他から得られた追加のパッケージのいずれも、コンポーネントパレットの相応の付加的タブに現れる。これらの新しいコンポーネントはデフォルトでついてくるものと同様に選択して、フォーム上で使用できる。
  
=== Customization ===
+
以下のコンポーネントの一覧でユニットの記述を含むファイルへのリンクが現れる。もし、あるコンポーネントのプロパティを探したいのであれば、そのコンポーネントの継承と、それが由来する基底型のプロパティについても調べておく価値がある。例えば、[[TMaskEdit]]を理解するには、[[TCustomMaskEdit]]を検討することは有用である。
Using the menu [Tools|Options] or {{keypress|Crtl-Shift-O}} it is possible to change layout and visibility of the component palette items.
+
 
 +
=== カスタマイゼーション ===
 +
メニュー、[Tools|Options](ツール -> オプション...)もしくは{{keypress|Crtl-Shift-O}}でコンポーネントパレットの項目の配置と外観を変えることができる。
  
 
[[File:IDE Options - Environment - Component Palette.png]]
 
[[File:IDE Options - Environment - Component Palette.png]]
  
=== Examples ===
+
=== ===
Several useful  [[Dialog Examples|dialog procedures or functions]] don't appear on the palette, but are easily used as direct calls from your [[Source code|source]] [[Program|program]].
+
パレットに現れない、有用だが簡単に、[[Source code|ソース]][[Program|プログラム]]で用いることができる、[[Dialog Examples|ダイアログ プロシージャ、または関数]]がある。
 +
 
 +
コンポーネントを用いるいくつかの良い例はソースコードをインストールした$LazarusPath/lazarus/examplesで見つかる。多くのプログラムは直接、IDEとコンポーネントパレットを用いない、またはフォーム定義ファイルから独立してダイアログや他のコンポーネントを使う方法を示している。すべてのコンポーネントは十分に、そして明示的にPascalプログラムで定義されている。他のプログラム例はIDEを十二分に活用している。
  
For several good examples of the use of Components see the $LazarusPath/lazarus/examples subdirectory of your source installation. Many of the programs show how to use dialogs and other components directly without using the IDE and component palette or having a separate form definition file:  all the components are fully and explicitly defined in the main Pascal program.  Other example programs make full use of the IDE.
+
これらの例を開くときにはプロジェクトとして、.lpiファイルを開くことを覚えておきたい。.pasソースコードをひらいて、「実行」を打ち込んでしまうと、このソースファイルを最後に開いたプロジェクトが何であれ、それに付け加えられてしまう。
  
Remember to open these examples as projects, with the .lpi file. Opening the .pas source code file and hitting RUN will just  append this source file to whatever project you opened last.
+
いくつかの例はそのままでは動かない: パスとファイルのパーミッションを適宜調整する必要がある。もし、これらの例のいずれかをコンパイルしたいときは、そのディレクトリに対して、読み取り/書き込み/実行権限を持っていることを確認すること。またはファイルを適切な権限を持ったディレクトリにコピーすること。
  
Some examples don't work straight away: you may need to play about with paths and permissions of files or directories.  If you want to compile any of the examples, make sure that you have read/write/execute permissions for the files and directories, or copy the files to a directory where you do have the appropriate permissions.
+
一緒になっている小さなテストフォーム例とそれで利用できるコンポーネントのメニューを見るために「testall(テスト向きの(訳注1))」プログラムを実行して、そしてそれらがどのように動くか点検すること!
  
Try running the 'testall' program to see a menu of the available components together with small example test forms for most of them;  then inspect the code to find out how they work!
+
訳注1:readmeになぞらえたものと思われる。

Revision as of 17:17, 16 March 2024

English (en) suomi (fi) français (fr) 日本語 (ja) русский (ru)

日本語版メニュー
メインページ - Lazarus Documentation日本語版 - 翻訳ノート - 日本語障害情報

コンポーネントパレット(IDEにある)はフォームを構築する際に主に用いられるコンポーネントを表す、数多くのアイコンが並べられたツールバーである。

size="100%

Component Palette
Standard - Additional - Common Controls - Dialogs - Data Controls - Data Access - System - Misc - LazControls - RTTI - SQLdb - Pascal Script - SynEdit - Chart - IPro

それぞれのタブはコンポーネントの機能的なグループを表す、異なるアイコンセットを表示する。それぞれのタブグループのもっとも左のアイコンは、セレクションツールと呼ばれる左斜めに傾いた矢印である。

アイコンをクリックせずにコンポーネントパレット上の、どのアイコンにマウスカーソルをかざしても、コンポーネントの名称がポップアップする。それぞれの名称はTで始まっており、これは「Type」、より正確に言えばそのコンポーネントの「クラス」を表していることに注意すること。フォームに含めるためにコンポーネントを選択すると、Unit(通常はTForm1全体の部分)のinterface type セクションにClassが追加され、そしてそのクラスのinstance(インスタンス)が var セクション(通常は変数Form1として)に追加される。Form、あるいはそのコンポーネント(即ち、Procedure(プロシージャ)またはFunction(関数))によって用いられるために設計されたどの Methods (メソッド)もユニットの implementation (実装部)に置かれる。

パレットの用い方

パレットを用いるには、エディタのヴューに空きフォームがなければならない(もしなければ、ファイル -> 新規フォーム、を選択する)。使いたいコンポーネントを含む相応のアイコンをクリックし、フォーム上のコンポーネントを現したい付近をクリックする。望むコンポーネントが現れたら、マウスでそれをクリックすることで選択できる。ひとたびフォーム上で選択されれば、そのオブジェクトは、プロパティとイベントを編集できるオブジェクトインスペクタウィンドウでも選択できる。

オブジェクトの外観を調整するには、マウスを用いてフォーム上の画そのものを変える、あるいはそれに対するプロパティをそのコンポーネントに対するオブジェクトエディタで調整することもできる。

もし、自分自身で作った、あるいは他から得られた追加のパッケージのいずれも、コンポーネントパレットの相応の付加的タブに現れる。これらの新しいコンポーネントはデフォルトでついてくるものと同様に選択して、フォーム上で使用できる。

以下のコンポーネントの一覧でユニットの記述を含むファイルへのリンクが現れる。もし、あるコンポーネントのプロパティを探したいのであれば、そのコンポーネントの継承と、それが由来する基底型のプロパティについても調べておく価値がある。例えば、TMaskEditを理解するには、TCustomMaskEditを検討することは有用である。

カスタマイゼーション

メニュー、[Tools|Options](ツール -> オプション...)もしくはCrtl-Shift-Oでコンポーネントパレットの項目の配置と外観を変えることができる。

IDE Options - Environment - Component Palette.png

パレットに現れない、有用だが簡単に、ソースプログラムで用いることができる、ダイアログ プロシージャ、または関数がある。

コンポーネントを用いるいくつかの良い例はソースコードをインストールした$LazarusPath/lazarus/examplesで見つかる。多くのプログラムは直接、IDEとコンポーネントパレットを用いない、またはフォーム定義ファイルから独立してダイアログや他のコンポーネントを使う方法を示している。すべてのコンポーネントは十分に、そして明示的にPascalプログラムで定義されている。他のプログラム例はIDEを十二分に活用している。

これらの例を開くときにはプロジェクトとして、.lpiファイルを開くことを覚えておきたい。.pasソースコードをひらいて、「実行」を打ち込んでしまうと、このソースファイルを最後に開いたプロジェクトが何であれ、それに付け加えられてしまう。

いくつかの例はそのままでは動かない: パスとファイルのパーミッションを適宜調整する必要がある。もし、これらの例のいずれかをコンパイルしたいときは、そのディレクトリに対して、読み取り/書き込み/実行権限を持っていることを確認すること。またはファイルを適切な権限を持ったディレクトリにコピーすること。

一緒になっている小さなテストフォーム例とそれで利用できるコンポーネントのメニューを見るために「testall(テスト向きの(訳注1))」プログラムを実行して、そしてそれらがどのように動くか点検すること!

訳注1:readmeになぞらえたものと思われる。