第 3 章 フレーム

◀ 3. 1 フレームの作成   【目  次】   3. 3 オプションの設定と取得 ▶

999999

 更新日:


 このホームページは Amazon Kindle 本の作成中の草稿です。日々、原稿を見直しているので、内容が変わることに留意して読んで下さい。本が出版され次第、このホームページは削除されます。

3. 2 オプションパラメータ

 フレームのオプションとして下記の 標準オプション と固有のオプションが定義されています。


標準オプション
標準オプション を参照

'bd' or 'borderwidth' ウィジェット境界枠の線幅。。
'cursor' マウスポインタのカーソル形状
'highlightbackground' 入力フォーカスがない場合に強調表示領域に表示する色。
'highlightcolor' 入力フォーカスがある場合に強調表示領域に表示する色。
'highlightthickness' 強調表示領域の幅。
'padx' x 方向のパッディングの幅。
'pady' y 方向のパッディングの幅。
'relief' ウィジェット境界枠の形状。
'takefocus' フォーカスの受け入れの設定。

固有オプション

'background' or 'bg' ウィジェットの背景色。
標準オプションと同じですが、空文字を指定することができます。この場合、背景や境界線を表示しません。
'class' オブジェクトのクラス名
このクラス名はオブジェクトを識別するために用いられ、同じクラス名は同一のグループに属するものとして扱われます。例えば、「bind_class」メソッドでは、指定したクラス名を持つオブジェクトの全てにイベント処理が行われます。 このオプションはオブジェクトの作成時にのみ指定することができ、「configure」メソッドで設定、変更することはできません。
'colormap' Specifies a colormap to use for the window. The value may be either new, in which case a new colormap is created for the window and its children, or the name of another window (which must be on the same screen and have the same visual as pathName), in which case the new window will use the colormap from the specified window. If the -colormap option is not specified, the new window uses the default colormap of its screen. This option may not be changed with the configure widget command.
ウィンドウに使用するカラーマップを指定します。値は、ウィンドウとその子に対して新しいカラーマップが作成される新しいもの、または別のウィンドウの名前(同じ画面上にあり、pathNameと同じビジュアルを持つ必要があります)のいずれかで、新しいウィンドウは指定されたウィンドウのカラーマップを使用します。-colormap オプションが指定されていない場合、新しいウィンドウは画面のデフォルトのカラーマップを使用します。このオプションは、configure widget コマンドで変更することはできません。
'container' The value must be a boolean. If true, it means that this window will be used as a container in which some other application will be embedded (for example, a Tk toplevel can be embedded using the -use option). The window will support the appropriate window manager protocols for things like geometry requests. The window should not have any children of its own in this application. This option may not be changed with the configure widget command. Note that -borderwidth, -padx and -pady are ignored when configured as a container since a container has no border.
値はブール値でなければなりません。 true の場合、このウィンドウが他のアプリケーションが組み込まれるコンテナとして使用されることを意味します (たとえば、Tk のトップレベルは -use オプションを使用して埋め込むことができます)。 ウィンドウは、ジオメトリ リクエストなどに対応する適切なウィンドウ マネージャー プロトコルをサポートします。 このアプリケーションでは、ウィンドウはそれ自体の子を持つべきではありません。 このオプションは、configure widget コマンドでは変更できません。 コンテナーには境界線がないため、コンテナーとして構成されている場合、-borderwidth、-padx、および -pady は無視されることに注意してください。
Windows 10 では「ウィンドウは、ジオメトリ リクエストなどに対応する適切なウィンドウ マネージャー プロトコルをサポートします。」は一部しか動作しない。 透過
'height' ウィジェットの高さ。
整数値の文字列または数値で指定した場合、ピクセル単位になります。
「0」以下の値を指定すると、サイズは「1」ピクセルになります。
デフォルトでは「0」が設定されています。
'visual' Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the same visual as its parent. The -visual option may not be modified with the configure widget command.
Tk_GetVisual によって受け入れられるフォームのいずれかで、新しいウィンドウの視覚情報を指定します。 このオプションが指定されていない場合、新しいウィンドウはその親と同じビジュアルを使用します。 -visual オプションは、configure widget コマンドでは変更できません。
'width' ウィジェットの幅。
整数値の文字列または数値で指定した場合、ピクセル単位になります。
「0」以下の値を指定すると、サイズは「1」ピクセルになります。
デフォルトでは「0」が設定されています。