Table Window column trouble with KillFocus SetFocus

forum.centura.team.developer (2000-2005) & forum.sqlwindows (2000-2005)
quasar_benoit
France
Posts: 24
Joined: 22 Jul 2018, 16:42
Location: Annecy, France

Table Window column trouble with KillFocus SetFocus

Post by quasar_benoit » 05 Oct 2000, 06:02

 Posted by:  Benoît DELALANDE 

Hi there,

Working with Centura 1.5 Ptf3 on NT4 SP3

In a populated Table window with a column having the focus, when pushing the
down arrow key to go to the next row, the column receive first a
SAM_KillFocus
and then a SAM_SetFocus.

The problem is when receiving the KillFocus, the value of the column has
already been switched to the one of the next row.

Any idea of what is happening ?

Neil

Table Window column trouble with KillFocus SetFocus

Post by Neil » 05 Oct 2000, 10:10

 Posted by:  Neil 


You're probably trying to use SAM_KillFocus for the wrong reason. If you want to
look at the value of a field before the focus has left you should be using the
SAM_Validate message.

Hartmut Stumpf

Table Window column trouble with KillFocus SetFocus

Post by Hartmut Stumpf » 05 Oct 2000, 10:21

 Posted by:  Hartmut Stumpf 

I think it´s the easiest to define a variable witch contain the current
context (nContext = SalTblQueryContext ( hWndTbl )) and the last context.
So you can use SalTblSetContext to take the columnvalue.

quasar_benoit
France
Posts: 24
Joined: 22 Jul 2018, 16:42
Location: Annecy, France

Table Window column trouble with KillFocus SetFocus

Post by quasar_benoit » 06 Oct 2000, 02:05

 Posted by:  Benoît DELALANDE 

Hey Neil,

I have a column who is empty, then if the user do not type something then it
must take a default value. How can I pass into the ValidateMessage with NO
typing.

I just think there is a problem with KillFocus message with table window :
It should run like this : the context should be set AFTER sending KillFocus
not before.

Lubos Vnuk

Table Window column trouble with KillFocus SetFocus

Post by Lubos Vnuk » 06 Oct 2000, 09:15

 Posted by:  Lubos 

Hi !

Notice, there is handle of window loosing/getting focus in wParam of
SAM_KillFocus and SAM_SetFocus
You can for example on SAM_SetFocus get handle of window loosing focus and
operate with it ..
I hope this is usefull for U

Lubos

Lubos Vnuk

Table Window column trouble with KillFocus SetFocus

Post by Lubos Vnuk » 06 Oct 2000, 09:17

 Posted by:  Lubos 

Exuse my mistakes

losing, not loosing, of course ...

Lubos

Neil

Table Window column trouble with KillFocus SetFocus

Post by Neil » 06 Oct 2000, 10:19

 Posted by:  Neil 


Strangely enough the SAM_SetFocus message is sent too early to set the field
edit flag...

* On SAM_SetFocus
o Call SalPostMsg( hWndItem, AM_SetFieldEdit, TRUE, 0 )
* On AM_SetFieldEdit
o Call SalSetFieldEdit( hWndItem, wParam )

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests