背景色と境界線
交互に使用する背景色
奇数番の行/列に使用するための異なる背景色を設定することができます。リストボックス列では、デフォルトで 自動 が選択されています。また、リストボックス列は、リストボックスレベルで設定されている "交互に使用する背景色" も使用します。
このプロパティはOBJECT SET RGB COLORS コマンドを使用しても設定することができます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| alternateFill | string | 任意の CSS値; "transparent"; "automatic"; "automaticAlternate" |
対象オブジェクト
コマンド
OBJECT GET RGB COLORS - OBJECT SET RGB COLORS
背景色/塗りカラー
オブジェクトの背景色/塗りカラーを設定します。一部の標準のオブジェクト(fill JSON プロパティを使用) あるいは"カスタムスタイル" オブジェクト (borderFillColor JSON プロパティを使用) に対して定義することが可能です。
塗りカラー プロパティはリストボックス、リストボックスカラム およびList Box Footer オブジェクトでは背景色 という名前になっています。
標準のオブジェクト
リストボックス列の場合は、デフォルトで 自動 が選択されています。また、リストボックス列は、リストボックスレベルで設定されている "交互に使用する背景色" も使用します。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| fill | string | 任意の css値; "transparent"; "automatic" |
対象オブジェクト
階層リスト - リストボックス - リストボックスカラム - リストボックスフッター - 楕円 - 四角 - テキストエリア
コマンド
LISTBOX Get row color - LISTBOX SET ROW COLOR - OBJECT GET RGB COLORS - OBJECT SET RGB COLORS
カスタムボタン、カスタムチェックボックス、あるいはカスタムのラジオボタン
このプロパティを使用することで、カスタムボタン 、カスタムのチェックボックス 、あるいはカスタムのラジオボタン に対して塗りカラー属性を割り当てることができます。さらに、カスタムボタン の場合には、"カスタム" 境界線スタイル になっている必要があります。その他のコンテキストにおいては、このプロパティは無視されます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| borderFillColor | string | 任意の css値; "transparent"; "automatic" |
対象オブジェクト
カスタムボタン("カスタム" の境界線スタイル のもの) - カスタムチェックボックス - カスタムラジオボタン
コマンド
OBJECT GET RGB COLORS - OBJECT SET RGB COLORS
参照
背景色式
セレクションとコレクション型リストボックス
リストボックスの各行にカスタムの背景色を指定するための式または変数 (配列変数は使用不可)。式または変数は表示行ごとに評価され、RGB値を返さなくてはなりません。詳細については、OBJECT SET RGB COLORS コマンドの詳細を参照してください。
また、このプロパティは LISTBOX SET PROPERTY コマンドに lk background color expression 定数を指定して設定することもできます。
コレクション/エンティティセレクション型リストボックスでは、このプロパティは メタ情報式 を使用しても設定することができます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| rowFillSource | string | RGBカラー値を返す式 |
対象オブジェクト
コマンド
LISTBOX Get property - LISTBOX SET PROPERTY
境界線カラー
Allows defining the border color. The effect of this property varies slightly depending on the type of object to which it is applied.
-
objects with text properties: buttons (all styles except "custom", see below), hierarchical lists, inputs, list boxes, progress indicators, rulers, and text areas.
By default, the border color of these objects is automatically set to their font color property. This default configuration corresponds to the Same as font option in the Property List (borderColorproperty is undefined in JSON).
You can separate these two properties by setting a color value for the object's "Border color" property (only available when the border line style property is plain (solidin JSON property) or dotted). -
objects without text properties: 4D View Pro areas, 4D Write Pro areas, button grids, picture buttons, picture pop-up menus, plug-in areas, subforms, spinners, splitters, steppers, web areas.
The border color property sets the color of the borders. The default color value is "Automatic", i.e. the border is displayed with the automatic color set by your OS. -
custom-styled buttons: custom buttons with "custom" Border Line Style, custom check boxes, and custom radio buttons.
In this case, the border color property defines the color of an inner border, which is an attribute of the object itself ans not a decoration property. This inner border can also have a width (it is displayed only if the width > 0).
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| borderColor | string | 任意の css値; "transparent"; "automatic" |
対象オブジェクト
4D View Pro area - 4D Write Pro area - Button - Button Grid - Check Box ("custom" style) - Hierarchical List - Input - List Box - Picture Button - Picture Pop-up Menu - Plug-in Area - Progress Indicator - Radio Button ("custom" style) - Ruler - Text Area - Spinner - Splitter - Stepper - Subform - Web Area
コマンド
OBJECT GET RGB COLORS - OBJECT SET RGB COLORS
参照
Line Color (for shapes)
境界線スタイル
Allows setting a style for the object border. The following choices are available (all choices are not possible depending on the object):
| Style | Objects (*) | 説明 |
|---|---|---|
| なし | all | Objects appear with no border. |
| Plain | all | Objects appear framed with a continuous 1-pt. border line. ("solid" json value) |
| Dotted | all | Objects appear framed with a dotted 1-pt. border line. |
| Raised | all | Objects appear framed with a 3D effect. |
| Sunken | all | Objects appear framed with a sunken 3D effect. |
| Double | all | Objects appear framed with a double line, i.e., two continuous 1-pt. lines separated by a pixel. |
| System | all except buttons and text areas | Objects appear with a border line based on the graphic specifications of the OS. |
| System rounded | inputs | On macOS, objects appear with a native "Liquid Glass" system border effect (for information about Liquid Glass, see this 4D blog post). It includes system-defined inner border, corner radius, grey border color, and inner padding. Note that the "Liquid Glass" appearance is not used in a multiline input object if the scroll bars property is enabled ("System" is used in this case). On Windows, this style is similar to "System" at runtime. |
| カスタム | custom buttons | Enables the inner border design, that includes a set of extra properties: Fill color, Border color, Border width, and Corner radius. |
(*) "all" means "all objects supported" listed below.
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| borderStyle | text | "custom", "dotted", "double", "none", "raised", "solid", "sunken", "system", "systemRounded" |
対象オブジェクト
4D View Pro エリア - 4D Write Pro エリア - ボタン - ボタングリッド - 階層リスト - 入力 - リストボックス - ピクチャーボタン - ピクチャーポップアップメニュー - プラグインエリア - 進捗インジケーター - ルーラー - スピナー - ステッパー - サブフォーム - テキストエリア - Web エリア
コマンド
OBJECT Get border style - OBJECT SET BORDER STYLE
参照
Dotted Line Type (shapes)
境界線幅
以下のオブジェクトに対して、内側の境界線の幅を定義します:
その他のコンテキストにおいては、このプロパティは無視されます。
値はピクセル単位で指定しなければなりません。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| borderWidth | number | 整数値(ピクセル)。最小値 = 0 |
対象オブジェクト
Button ("custom" style) (with "custom" Border Line Style) - Check Box ("custom style") - Radio Button ("custom" style)
角の半径
履歴
| リリース | 内容 |
|---|---|
| 21 R5 | カスタムスタイルのボタン、ラジオボタン、チェックボックスのサポート |
| 19 R7 | テキストと入力オブジェクトをサポート |
フォームオブジェクトの角の丸みをピクセル単位で指定します。デフォルトでは、角の半径は 0ピクセルとなっています。このプロパティを変更することによって独自の形の角の丸いフォームオブジェクトを描画することができます:
最小値は 0 で、この場合には標準の (角の丸くない) フォームオブジェクトが描画されます。最大値は四角のサイズに応じて変化し、動的に計算されます (ただし四角の短辺の半分を超えることはできません)。
- 角の半径プロパティは、境界線スタイルが "なし"、"標準"、"ドット" の場合にのみ利用可能です
- 角の丸みはフォームオブジェクトの外側に描画されます (つまり、オブジェクトはより大きく表示されますが、幅 と 高さ プロパティは変更されません)。
カスタムボタン ("カスタム" 境界線スタイルを使用)、 カスタムチェックボックス およびカスタムラジオボタン においては、角の丸みはオブジェクトのエリアの内側に描画されます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| borderRadius | integer | 最小値: 0 |
対象オブジェクト
Button ("custom" style) (with "custom" Border Line Style) - Check Box ("custom" style) - Input - Rectangle - Text Area - Radio Button ("custom" style)
コマンド
OBJECT GET CORNER RADIUS - OBJECT SET CORNER RADIUS
点線タイプ
点線のタイプを、点と白のパターンにより指定します。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| strokeDashArray | 数値配列または文字列 | 例: 例: 6個の点と1個の空白のパターンは "6 1" または [6,1] によって表します。 |
対象オブジェクト
追加の空白の行を非表示
リストボックスオブジェクト下部に追加される余分な空白行の表示を管理します。デフォルトで、4D は空のエリアを埋めるためにこのような行を追加します:
このオプションをチェックすると、これらの空白行を除去することができます。リストボックスオブジェクトの下部は空のままになります:
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| hideExtraBlankRows | boolean | true, false |
対象オブジェクト
コマンド
LISTBOX Get property - LISTBOX SET PROPERTY
線カラー
オブジェクトの線の色を指定します。カラーは次の方法で指定できます:
- カラーネーム - 例: "red"
- 16進数値 - 例: "#ff0000"
- RGB値 - 例: "rgb(255,0,0)"
このプロパティはOBJECT SET RGB COLORS コマンドを使用しても設定することができます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| stroke | string | 任意の css値; "transparent"; "automatic" |
This property is also available for objects with text properties, in which case it designates both the Font color and the object's lines, except if you used the Border color property.
対象オブジェクト
コマンド
OBJECT GET RGB COLORS - OBJECT SET RGB COLORS
線幅
線の幅を指定します。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| strokeWidth | number | 印刷されるフォームにおける最小幅 0 から、整数値 < 20 まで |
対象オブジェクト
行背景色配列
配列型リストボックス
リストボックスまたはリストボックス列の各行にカスタムの背景色を適用するのに使用する配列名です。
倍長整数型の配列の名前を入力しなければなりません。配列のそれぞれの要素はリストボックスの行 (あるいは列のセル) に対応します。 つまりこの配列は、各列に関連づけられている配列と同じサイズでなければいけません。 OBJECT SET RGB COLORS コマンドの章で説明されている定数を使用することができます。もし上のレベルで定義されている背景色をそのままセルに継承したい場合には、対応する配列の要素に -255 を渡します。
たとえば、リストボックスプロパティにてグレー/ライトグレーカラーが行の交互背景色として設定されているとします。同じリストボックスに行背景色配列が指定されており、行内で負の値が一つでもあれば色をオレンジに変えます:
<>_BgndColors{$i}:=0x00FFD0B0 // オレンジ
<>_BgndColors{$i}:=-255 // デフォルト値

次に、負の値を持つセルの色を濃いオレンジで示したい場合、各列にも行背景色配列を設定します (例: <>_BgndColor_1, <>_BgndColor_2 と <>_BgndColor_3)。これらの配列の値は、リストボックスプロパティに設定されているものや、全体用の行背景色配列よりも優先されます。
<>_BgndColorsCol_3{2}:=0x00FF8000 // 濃いオレンジ
<>_BgndColorsCol_2{5}:=0x00FF8000
<>_BgndColorsCol_1{9}:=0x00FF8000
<>_BgndColorsCol_1{16}:=0x00FF8000

LISTBOX SET ROW FONT STYLE および LISTBOX SET ROW COLOR コマンドを使用することでも同じ結果を得ることができます。コマンドを使う利点は、スタイル/カラー配列をあらかじめ列に設定する必要がないことです。 この場合、これらはコマンドによって動的に作成されます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| rowFillSource | string | 倍長整数型配列の名前 |
対象オブジェクト
コマンド
LISTBOX Get array - LISTBOX GET ARRAYS
透過
リストボックスの背景を透明にします。このプロパティが有効になっていると、列に対して設定されている 交互に使用する背景色 および 背景色 の設定は無視されます。
JSON 文法
| 名称 | データタイプ | とりうる値 |
|---|---|---|
| fill | text | "transparent" |
対象オブジェクト
コマンド
OBJECT GET RGB COLORS - OBJECT SET RGB COLORS