Is there a way to specify a minimum size for e.g. a window created with 'F'⎕WC'Form' so that I can resize the window but not make it smaller than a certain size?
1 Answer
I think the best approach is to create a Configure event callback which rejects sizes that are smaller than you want.
e.g.
'f' ⎕wc 'form' ('event' 'configure' 'onconfig')
⎕cr 'onconfig'
r←onconfig W
⎕←W
:If W[5]<10
:OrIf W[6]<20
r←0
:Else
r←1
:EndIf
This onconfig callback will reject the Configure event by returning 0 if W[5] < 10 or W[6] < 20.
W[5] is Height and W[6] is Width
⎕IO is 1
Regards,
Vince