質問

Is there any way to do that?

I mean, if the form fullfill specific conditions setVisible true or false to a control in the form? Or if i check a CheckBox, show some specific ComboBox?

Thanks in advance for your help

役に立ちましたか?

解決

I would recommend enabling and disabling fields, rather than hiding them.

Open a Supplier, and on the Invoice and Delivery fast tab choose select the Calculate withholding tax CheckBox. This is the VendTable form. The Calculate withholding tax control will enable and disable a second control depending upon the value selected.

VendTable.TaxWitholdCalculate

The second control has it's property AutoDeclaration set to Yes, and the event that fires the change can be found on the forms VendTable data source. Find the relevant field (VendTable > Data Sources > Vend Table > Fields > TaxWithholdCalculate) and notice that the modified method has been overridden, changing the control's enabled property. It also has a visible property should you want to remove it from view.

VendTable.TaxWitholdCalculate2

Top Tip: In case that you are not aware, you can right click on any control on a form and choose the Personalise option from the context menu. From there is a form which contains a very useful box called System name. You can find the name of the control/table field from this.

VendTable.TaxWitholdCalculate3

他のヒント

I suggest you this solution for your second problem:

if i check a CheckBox, show some specific ComboBox?

I assume your form is complete (it has all controls needed : comboboxes, checkboxes, etc). And the controls AutoDeclaration-property is set to 'Yes'.

  1. In the AOT expand the Form till you find the CheckBox, expand it as well
  2. Right-click its Methods and select 'Override method' >> 'Clicked'
  3. Finally you can add this code and save/compile the form: myComboBox.visible(true);

It should look like:

public void clicked()
{
    super();
    myComboBox.visible(true);
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top