Print

Print


Stephane Richard <[log in to unmask]> writes:

> Hello everyone,

Some might complain that this is the wrong forum for this question;
we're supposed to be discussing Ada advocacy, not the details of
specific problems. comp.lang.ada would be good for this.

>
>
> Let's say I would like to manage a keypress or a mouse click in a
> windows form I created using either the win32ada binding, or Windez.

If you meant 'Windex', I can help.

> How would I go about that? Here's example names for the sake of an
> example.
>
> Form:     frmClientEntry
> Control:  txtPhoneNumber   (this is a regular windows' text box).
>           cmdSave          (this is a regular windows' command button).

In Windex, you do not use the win32Ada binding directly; you _only_
use Windex functions. There is a Windex package for text boxes:
http://users.erols.com/leakstan/Stephe/Ada/Windex_Packages/index.htm
windex-windows-edit_text.ads

It provides Events, such as Text_Change, that are handled by your main
window (or the text box parent), by overriding the procedure
Windex.Windows.User.Notify_Handler.

There are examples in the Windex test code; I don't have any real
applications that use Buttons or Text boxes (well, at least none on
the web site).

If you need more help, email me privately at [log in to unmask]

--
-- Stephe