TableColumn (クラス)
public sealed TableColumn {inherits TableFile}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.

Table の列を表します。

プログラミング注意事項

この列に関連する Table は、TableColumn.table を呼び出して取得します。Table 内のこの列のインデックスは TableColumn.index を使用して取得されます。この TableColumn で設定されるオプションは、テーブルのオプション ルックアップ規則に基づいて列内の TableCell およびテーブル要素に反映されます。

プロパティ
border-width:Table の内部ボーダーの幅。
ローカル オプション public TableColumn.border-width:any
row?:この TableFile が行と列のいずれを表しているかを判断します。
アクセサ public TableColumn.row?:bool
width:Table 列の幅を制御します。
ローカル オプション public TableColumn.width:any
プロパティ 継承 TableFile: background, border-color, children, first-position, group, index, last-position, option-parent, option-register-proc, table
プロパティ 継承 TablePropertyList: halign, height, hstretch?, opaque-cell?, seqnum-generator, valign, vstretch?
プロパティ 継承 GraphicOptionList: options
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 OptionListInterface: options-present-here, registered-option-keys, style-options

メソッド
メソッド 継承 TableFile: local-remove-notify, option-change-notify, option-lookup-here, propagate-option-change
メソッド 継承 TablePropertyList: new-option-item
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, non-keyword-init-arg, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 OptionListInterface: add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, name-to-option-key, notify-option-children, option-changed, option-lookup, option-propagate-notify, option-set?, register-options, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize




プロパティ詳細
border-width (ローカル オプション)
public TableColumn.border-width:any

Table の内部ボーダーの幅。



row? (アクセサ)
アクセサ public TableColumn.row?:bool

この TableFile が行と列のいずれを表しているかを判断します。

戻り値

このオブジェクトが Table 行を表している場合は true です。この場合、このオブジェクトが TableRow であると見なしても安全です。このオブジェクトが Table 列を表している場合は false です。この場合、このオブジェクトが TableColumn であると見なしても安全です。


width (ローカル オプション)
public TableColumn.width:any

Table 列の幅を制御します。

説明

このオプションは、対応する列の幅を制御するために TableColumn オブジェクトで設定できます。オプションの値は任意の Dimension になります。このオプションを設定した場合の効果は、幅が指定された Dimension に設定されているテーブル列に余分な Fill オブジェクトを追加する場合の影響に似ています。したがって、テーブル列のオブジェクトの伸長性が低い場合、またはその最小値がこのオプションの値である Dimension よりも大きい場合、このオプションの設定は効果がありません。

通常、このオプションは Table 列に対して固定された最小幅を指定するために使用され、Table 列の自動サイズ変更をオーバーライドしてこれが発生しないようにします。次の例では、このオプションを使用して各列を同じ幅にしています。列に含まれるテキストの幅は異なります。さらに、TableColumn.halign オプションの値が異なる場合の効果も示されています。


{Table cell-border-width=1pt, cell-border-color="blue",
       border-width=1pt, border-color="blue",
       {column-prototype width=1.5in, halign="right",
               {bold Meal},
               {text Breakfast},
               {text Lunch},
               {text Dinner}},
       {column-prototype width=1.5in, halign="center",
               {bold When},
               {text 8:00 am},
               {text 12:00 noon},
               {text 6:00 pm}},
       {column-prototype width=1.5in, halign="left",
               {bold Where},
               {text Kitchen},
               {text Office},
               {text Dining Room}}}


さらに、 TableColumn において width オプションを指定すると、大きなテキストのブロックを含む列の幅を制御することができます。次の例では、テキスト ブロックは自然な形式を利用しています。これはテキストが 1 行になるまで、水平に広げていく方法です。


{Table
    cell-border-width=1pt, cell-border-color="blue",
    border-width=1pt, border-color="blue",
    {column-prototype halign="right",
            {bold Meal},
            {text Breakfast},
            {text Lunch},
            {text Dinner}},
    {column-prototype
        halign="left",
        {bold Reason},
        {text Supplies energy to get the day off to a good start.},
        {text Gives you a reason to fall asleep in the afternoon.},
        {text Prevents you from going to bed hungry.}}}


意図的に "Reason" の列を狭くする場合は、その列の幅を指定する必要があります。ただし幅は、その 伸長順位 がテキスト ブロックの 圧縮順位 に比べてより固定された、Elastic でなくてはなりません。幅を 2in などに指定すると、これは Elastic に変換されます。この伸長性と圧縮性は、テキスト ブロックの伸長順位および圧縮順位と同じです。テキスト ブロックが水平に広がらないようにするには、その伸長に対する抵抗性が、テキスト ブロックの圧縮性に対する抵抗性よりも大きい Elastic が必要です。rigid-threshold-stretch-order の伸長順位を使用すると、この作業が実行されます。次の例では、列の width オプションを、以下により生成される Elastic に設定します。

{make-elastic preferred-size=2in, stretch-order=rigid-threshold-stretch-order}


{Table
    cell-border-width=1pt, cell-border-color="blue",
    border-width=1pt, border-color="blue",
    {column-prototype halign="right",
            {bold Meal},
            {text Breakfast},
            {text Lunch},
            {text Dinner}},
    {column-prototype
        width={make-elastic preferred-size=2in,
                            stretch-order=rigid-threshold-stretch-order},
        halign="left",
        {bold Reason},
        {text Supplies energy to get the day off to a good start.},
        {text Gives you a reason to fall asleep in the afternoon.},
        {text Prevents you from going to bed hungry.}}}





メソッド詳細