Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Suppressing DDDW and using arrow keys

78 views
Skip to first unread message

Mark Jones

unread,
Dec 10, 1997, 3:00:00 AM12/10/97
to

I am creating a generic datawindow user object. The users of this object
need the ability to recode data that is displayed in the datawindow. This
recoding is table driven. For instance, the user sees and enters 12 but
actually 5003 is entered into the database. There is a list of valid
values that the user can enter that is determined by the DDDW but I still
want this field to look and feel like an ordinary Edit field.

In summary I want to take advantage of the recoding properties of the DDDW
without it being a DDDW.

Here is the problem:
By creating a numeric field with:
Always Show List - checked
Width of drop down - 1%
I can have a field that recodes input, does not show an DDDW arrow or list
and gives me nearly what I want. The only problem is that the up/down
arrow keys which normally move between datawindow rows will instead move
the user between items in the DDDW (that they cannot see) and so the
behaviour of this field is nearly ,but not quite like an edit!

Clearly I can execute this recoding during the retrieveend and updatestart
events but in this case I would be helpful to me to have it work using the
DDDW.

Any bright ideas?

Thanks for your help, in advance.

Mark Jones

Sanjiv Das [TeamPS]

unread,
Dec 19, 1997, 3:00:00 AM12/19/97
to

Mark,

Have you looked at overriding the default processing of the down ( or up )
arrow key ? You could create a user event mapped to pbm_dwnkey and check
whether the down arrow was pressed. If so, you can programmatically move the
user to the next row.


HTH

Sanjiv Das [TeamPS]

Mark Jones wrote in message
<01bd05a7$1219cd00$636c1fac@configure_me.damark.com>...

Lijun Yang

unread,
Dec 22, 1997, 3:00:00 AM12/22/97
to Mark Jones

Sanjiv,

When a dddw gets focused, the up arrow and down arrow key will not
trigger the pbm_dwnkey event. The reason is that pbm_dwnkey is dw
event, not a dddw event.

Mark,

If you really want to use the dddw feature, you may track the keydown
event in "other event" by reading the values of message.lparam and
message.wparam. By doing so, you may at first use watcom spy to find out
the value of key down event value and uparrow and downarrow values from
message.lparam and message.wparam, then write some logic in the "other"
event in datawindow.

Another option could be -

Before update the data, translate user-entered data to the data you want
to save.

In order to be transparent to end users, you may translate and update
the data behind datawindow via a datastore.

I am not sure which is easier for you.

HTH,

--
Lijun
===============================================
Lijun Yang Mailto:Ly...@rgti.com
mailto:Lijun...@worldnet.att.net
===============================================

0 new messages