From: Busch, Ciske

Subject: RE: Where's my Key-Down-Event?

Date: 2000-6-15 12:31


Hi,

thank your for your suggestion...

> >(I tried to solve this by using a static text and opening > >a temporary editable-text at the same position after the > >user clicked into the static-text. Removing the editable-text > >works fine when using mouse-clicks but not when pressing > >enter or tab.)
> > Looks too twisted to be a good solution. I think you just > should use an > editable-text with the following arguments: > (make-instance 'editable-text > :background-color light-gray > :border :none > ... ) >
> >Unfortunatly I do not know how to move the keyboard focus > >away from that control after the user has finished editing.
> > You should not have to bother about focus here.
... but if I cannot move the keyboard focus away from the control how can I stop the user from changing the text? If I use your suggested solution any keyboard entry will change the text once the control has been "activated". What I want to achieve is a control that behaves like a "filename"-thingy in windows which a user can click on to edit and which gives keyboard focus back to it's parent after the user pressed ENTER. The only way I know to recognize the ENTER key would be to use a multi-line-editable-text and check for newlines. BUT this control always has a 3d-border which I can not get rid of (at least not by using the :border argument). And there may just be one control in the parent-dialog - so I can not just "tab" over to another control. ciske busch