lang • with


WITH Object ... END WITH

Between the WITH and the END WITH instruction, an expression beginning with a point is referring to Object.

You can nest WITH ... END WITH structures.


With hButton
  .Text = "Cancel"
End With

' is equivalent to

hButton.Text = "Cancel"

Array accessors shortcut

Since 3.5

Since Gambas 3.5, the following syntax can be used as array accessors shortcut:

With Array
  .[0] = "First slot"
  .[1] = "Second slot"
End With
With Collection
  !key = "Value"
End With

See also