FormListControl.columnHeaderButton Method

Definition

Overloads

columnHeaderButton()

Sets or gets a Boolean data type value that indicates whether a form list control has a column header button.

columnHeaderButton(Boolean)

columnHeaderButton()

Sets or gets a Boolean data type value that indicates whether a form list control has a column header button.

public:
 virtual bool columnHeaderButton();
public virtual bool columnHeaderButton ();
abstract member columnHeaderButton : unit -> bool
override this.columnHeaderButton : unit -> bool
Public Overridable Function columnHeaderButton () As Boolean

Returns

true if the control has a column header button; otherwise, false.

Remarks

To display columns in a form list control, call the FormListControl.viewType method, and then pass the FormListViewType::Report enumeration value. You must call the columnHeaderButton method before you add a column to the form; otherwise, the column does not appear in the form list control.

The following example shows a call to the columnHeaderButton method to indicate that the form list control has a column header button. The FormListControl.addColumn method adds the column to the form list control.

static void createForm2(Args _args) 
{ 
    Args args; 
    Form form; 
    FormRun formRun; 
    FormBuildDesign formBuildDesign; 
    FormBuildDataSource formBuildDataSource; 
    FormBuildListControl formBuildListControl; 
    FormListControl formListControl; 
    FormListColumn formListColumn; 
    int idx4; 
    DictTable dictTable; 
    CustTable custTable; 
    boolean columnHeaderBtn; 
    // Create the form header. 
    form = new Form(); 
    // Add data sources to the form. 
    dictTable = new DictTable(tableNum(custTable)); 
    formBuildDataSource = form.addDataSource(dictTable.name()); 
    formBuildDataSource.table(dictTable.id()); 
    // Create the form design. 
    formBuildDesign = form.addDesign("Design"); 
    formBuildDesign.caption("myForm"); 
    // Add a form list control. 
    formBuildListControl = 
 formBuildDesign.addControl(FormControlType::ListView,"List"); 
    idx4 = formBuildListControl.id(); 
    args = new Args(); 
    args.object(form); 
    // Create the run-time form. 
    formRun = classfactory.formRunClass(args); 
    formRun.run(); 
    formRun.detach(); 
    formListControl = formRun.control(idx4); 
    formListControl.viewType(FormListViewType::Report); 
    formListControl.height(120); 
    formListControl.widthMode(FormWidth::ColumnWidth); 
    columnHeaderBtn = formListControl.columnHeaderButton(true); 
    // Add a column to the form list control. 
    formListControl.addColumn(1, new FormListColumn("Column1")); 
}

Applies to

columnHeaderButton(Boolean)

public:
 virtual bool columnHeaderButton(bool _value);
public virtual bool columnHeaderButton (bool _value);
abstract member columnHeaderButton : bool -> bool
override this.columnHeaderButton : bool -> bool
Public Overridable Function columnHeaderButton (_value As Boolean) As Boolean

Parameters

_value
Boolean

A Boolean data type that indicates whether a form list control has a column header button.

Returns

Applies to