Toolbar flatbutton keyboard accelerator

forum.gupta.bugreport (2005-2010)
Peter Dunlop

Toolbar flatbutton keyboard accelerator

Post by Peter Dunlop » 27 Jul 2005, 02:17

 Posted by:  Peter Dunlop 

Found this issue when coding with TD3.1 PTF3.

I have a test app with a toolbar that contains only a pushbutton and a
datafield (see attached file).

I have set the keyboard accelerator for the pushbutton as the Enter key.
When data is typed into the datafield and the Enter key is pressed, the push
button is actioned (as expected)
However, when the pushbutton is clicked directly, any further attempt to use
the Enter key during data entry does not action the pushbutton (this is the
Unexpected behaviour)

This problem only happens when the pushbutton appearance is set to 'Flat
Look'. It behaves correctly the button appearance is set to 'Standard'.

The sequence I have used to determine this problem is this:

- Type a couple of characters into the data field, then hit Enter. The
button is invoked an a message box displays to show it was pressed. This can
be done any number of times.
- Click on the pushbutton. The message box comes up again, as expected.
- Now type data into the datafield again and hit Enter. Nothing happens!

- Now change the pushbutton appearance attribute to 'Standard' and repeat
the above sequence. It works this time....

Unfortunately, flat buttons are a desired feature in my workplace. Is there
any way around this? I had previously posted under the
area requesting help on this issue before I discovered that the problem was
related to the 'flat look' attribute, and have tried many options in
trapping the windows messages at the datafield, with no success.

Peter Dunlop

You do not have the required permissions to view the files attached to this post.


Re: Toolbar flatbutton keyboard accelerator

Post by Günther » 27 Jul 2005, 11:28

 Posted by:  Günther 

Try this in the form window message section

On SAM_CreateComplete
Call SalSetDefButton( pb1 )

Peter Dunlop

Re: Toolbar flatbutton keyboard accelerator

Post by Peter Dunlop » 28 Jul 2005, 02:47

 Posted by:  Peter Dunlop 

A simple workaround, and it does the job perfectly!

Thanks very much,

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests