Selfmade Controls

Bruno Essmann (bessmann@iiic.ethz.ch)
Sat, 04 May 1996 22:43:17 +0200

Today I wanted to add a few new controls to a dialog I was working on. I
started out with the ObxButtons and experienced a few problems that somebody
of you probably already has solved...

1. Problems with linked commands:
When linking the command 'StdCmds.CloseDialog' to an ObxButtons button the
command traps when executed. I assume there's a problem with the focus, i.e.
'StdCmds.CloseDialog' is not able to determine the dialog to close.
I didn't try out other commands but I think this problem will also occur
with some other commands.
How does one have to modify ObxButtons that such commands work ?

2. How to set cancel/default button:
I expanded ObxButtons by cancel and default flags and the appropriate
properties messages to set/get the state of them. Even though the properties
are set correctly the button does not react to default/cancel keys.
How does one have to modify ObxButtons to make these flags work ?

3. Notifier and guard procedures:
Same problem as with the cancel/default problem. I expanded the sample to
support notifiers as well as guards but I don't have any idea how to take
advantage e.g. of a guard that sets the readOnly flag since I have no idea
how to check if a control is read-only or not - there is no property message
that reports those non-persistant states.
How does one support notifiers and guard procedures in selfmade controls ?

I hope somebody knows what I'm talking about since without the possibility to
support all commands, flags and notifiers/guards the selfmade controls are
pretty useless (well, at least one can't make 'interactive' controls)...

Cheers,
Bruno