Board index » delphi » mouse right-click

mouse right-click

I have a delphi 4 application.  When I enter a form and position the cursor on a TdbEDIT component and right-click with the mouse, all options other than copy are disabled.  Once I enter a keystroke, the options are enabled.  Is there a way to automatically enable these options when I enter the form?

Chris

 

Re:mouse right-click


On 8 Nov 2000 08:48:44 -0800, "Christopher" <McKCon...@cs.com> wrote:

Quote

I have a delphi 4 application.  When I enter a form and position the
cursor on a TdbEDIT component and right-click with the mouse, all
options other than copy are disabled.  Once I enter a keystroke, the
options are enabled.  Is there a way to automatically enable these
options when I enter the form?
<<

Chris, the menu is disabled because Dataset isn't in edit mode. You
can call DataSet's Edit method to put it in edit mode, but I'm not
sure is there a good place for that. Your best bet may be to create
this popup menu yourself (you can use standard database actions for
that) and then you can call DataSet.Edit in popup's OnPopup event.

HTH
ain

Re:mouse right-click


Quote
Ain Valtin wrote:

> Chris, the menu is disabled because Dataset isn't in edit mode. You
> can call DataSet's Edit method to put it in edit mode, but I'm not
> sure is there a good place for that. Your best bet may be to create
> this popup menu yourself (you can use standard database actions for
> that) and then you can call DataSet.Edit in popup's OnPopup event.

If the state of the popup menuitems is really controlled by the edit
control it would be interesting to find out how. The last piece of
info I got about that menu was that it is 100% controlled by windows
without any way to mess with it (for instance to prevent automatical
localization).

WL

Other Threads