I'm trying to integrate the number pad I modified into our invoice screen which is native xbase, not using express (I think I have it working everywhere else).
We have a GET for price. Under certain conditions, it just grabs price from products file and 'moves on'. Under other conditions, it stops on field to allow price to be entered or changed.
If it should stop for edit, and touch <> 'N' I want the number pad to pop up (PopNumPad() ), and return the value to the array element minvc[itm_ctr][5], then 'move on'.
The value has to validated as well.
Easy to do with DCGET.. but native get I don't think has an GOTFOCUS parameter
Here;s what I have now:
if touch = 'N'
@ rrow, 68 get minvc[itm_ctr][5] pict pd_pic;
valid min_margin(@minvc,itm_ctr,,@dummy)
else
????????
thanks
GOTFOCUS for non Express GET
GOTFOCUS for non Express GET
There are only 10 kinds of people - those who understand binary and those who don't
Re: GOTFOCUS for non Express GET
2 Choise :BruceN wrote:If it should stop for edit, and touch <> 'N' I want the number pad to pop up (PopNumPad() ), and return the value to the array element minvc[itm_ctr][5], then 'move on'.
Easy to do with DCGET.. but native get I don't think has an GOTFOCUS parameter
Here;s what I have now:
if touch = 'N'
@ rrow, 68 get minvc[itm_ctr][5] pict pd_pic;
valid min_margin(@minvc,itm_ctr,,@dummy)
else
????????
thanks
a.) while it is "before" you can try WHEN and use MyPopUp( @MyVar ) ( @ not need if Array )
b.) modify C:\ALASKA\XPPW32\Source\SYS\GetSys.prg
for GUI = YES C:\ALASKA\XPPW32\Source\SYS\GetSysX.prg
greetings by OHR
Jimmy
Jimmy
Re: GOTFOCUS for non Express GET
almost....
if touch = 'N'
@ rrow, 68 get minvc[itm_ctr][5] pict pd_pic;
valid min_margin(@minvc,itm_ctr,,@dummy)
else
@ rrow, 68 get minvc[itm_ctr][5] pict pd_pic;
valid min_margin(@minvc,itm_ctr,,@dummy);
when MyPopUp(minvc[itm_ctr][5])
function MyPopUp(tmp1)
tmp1:=PopNumPad(tmp1,'Enter Price')
return .f.
It calls the number pad popup, but closes it immediately without prompting for value. Everywhere else I use PopNumPad it allows for entry and closes when I click OK on the number pad.
hmmmmm
if touch = 'N'
@ rrow, 68 get minvc[itm_ctr][5] pict pd_pic;
valid min_margin(@minvc,itm_ctr,,@dummy)
else
@ rrow, 68 get minvc[itm_ctr][5] pict pd_pic;
valid min_margin(@minvc,itm_ctr,,@dummy);
when MyPopUp(minvc[itm_ctr][5])
function MyPopUp(tmp1)
tmp1:=PopNumPad(tmp1,'Enter Price')
return .f.
It calls the number pad popup, but closes it immediately without prompting for value. Everywhere else I use PopNumPad it allows for entry and closes when I click OK on the number pad.
hmmmmm
There are only 10 kinds of people - those who understand binary and those who don't
Re: GOTFOCUS for non Express GET
Native Gets DO have a GotFocus. It is called the setInputFocus "callback". Look it up in the Xbase++ docs.
The eXpress train is coming - and it has more cars.
Re: GOTFOCUS for non Express GET
I've been playing with this for 2 days with bizarre results.
(remember, this is OLD clipper code modified thru about 8 generations of changes)
Situation: a get on left side of screen for product ID, once that is read, get on right side for price shows (separate read statement). Using a WHEN clause with the call to the number pad for price entry in it, if I type in the ID the price read loads the numpad, then closes it immediately. If I use a button to pop up the keypad to enter the ID in, then everythnig works fine.
So much for the idea of a function being a 'blackbox' with no knowledge of anything except its input parameters.
I gave up and tried a brute force method. I tied the numpad function to a hotkey and then used a PostAppEvent to create that keystroke. It works. I know... not slick, but it appears to work properly.
thanks for thoughts anyway...
(remember, this is OLD clipper code modified thru about 8 generations of changes)
Situation: a get on left side of screen for product ID, once that is read, get on right side for price shows (separate read statement). Using a WHEN clause with the call to the number pad for price entry in it, if I type in the ID the price read loads the numpad, then closes it immediately. If I use a button to pop up the keypad to enter the ID in, then everythnig works fine.
So much for the idea of a function being a 'blackbox' with no knowledge of anything except its input parameters.
I gave up and tried a brute force method. I tied the numpad function to a hotkey and then used a PostAppEvent to create that keystroke. It works. I know... not slick, but it appears to work properly.
thanks for thoughts anyway...
There are only 10 kinds of people - those who understand binary and those who don't
Re: GOTFOCUS for non Express GET
If you can send me a small sample program, I'll see what I can do.
The eXpress train is coming - and it has more cars.
Re: GOTFOCUS for non Express GET
thanks Roger.. but no need. I tried to replicate the 'wrong' behavior in a small sample and couldn't get it to misbehave. In our real convoluted, cludged up code it acts up. I have a workaround so it is now fully functional, albeit even more cludged
thanks anyway.
thanks anyway.
There are only 10 kinds of people - those who understand binary and those who don't