<GUI>
 <Window height='90'>
  <Label
   text='Push the button below several times'
   height='%P%->ScaleHeight/2'
   align='center'
  />
  <Button
   text='Push me!'
   top='%P%->ScaleHeight/2'
   height='%P%->ScaleHeight/2'
   onClick='sub {
    $_[0]->Text($_[0]->Text eq "Thanks" ? "Push Me!"
                : "Thanks")
   }'
  />
 </Window>
</GUI>

Example 1: A window with Label and Button widgets overriding default values.

Back to Article