Thanks Antonio,
is it possible to group all the code for browsing in a own control, so that I have on one hand the get-fields and on the other the browse.
Regards
Otto
Focus oWnd
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Hello Antonio,
TPanel works.
Where I have problems is with the up,down,left,right-keys.
Do I have to change twindow?
I don't know how to use: WS_TABSTOP style
so I tried to do it with the VALID case.
Is this a bad solution?
You find my code on http://www.atzwanger.com/invoice/invoiceFor Antonio.zip
@ 1 , 1 GET oGet VAR cTest OF oPanelAddress SIZE 100,17 VALID (oPanelBody:SetFocus(),.t.)
Thanks in advance
Otto
METHOD KeyDown( nKey, nFlags ) CLASS TWBrowse
do case
case nKey == VK_UP
::GoUp()
case nKey == VK_DOWN
::GoDown()
case nKey == VK_LEFT
::GoLeft()
case nKey == VK_RIGHT
::GoRight()
case nKey == VK_HOME
::GoTop()
case nKey == VK_END
::GoBottom()
case nKey == VK_PRIOR
if GetKeyState( VK_CONTROL )
::GoTop()
else
::PageUp()
endif
case nKey == VK_NEXT
if GetKeyState( VK_CONTROL )
::GoBottom()
else
::PageDown()
endif
otherwise
return Super:KeyDown( nKey, nFlags )
endcase
return 0
TPanel works.
Where I have problems is with the up,down,left,right-keys.
Do I have to change twindow?
I don't know how to use: WS_TABSTOP style
so I tried to do it with the VALID case.
Is this a bad solution?
You find my code on http://www.atzwanger.com/invoice/invoiceFor Antonio.zip
@ 1 , 1 GET oGet VAR cTest OF oPanelAddress SIZE 100,17 VALID (oPanelBody:SetFocus(),.t.)
Thanks in advance
Otto
METHOD KeyDown( nKey, nFlags ) CLASS TWBrowse
do case
case nKey == VK_UP
::GoUp()
case nKey == VK_DOWN
::GoDown()
case nKey == VK_LEFT
::GoLeft()
case nKey == VK_RIGHT
::GoRight()
case nKey == VK_HOME
::GoTop()
case nKey == VK_END
::GoBottom()
case nKey == VK_PRIOR
if GetKeyState( VK_CONTROL )
::GoTop()
else
::PageUp()
endif
case nKey == VK_NEXT
if GetKeyState( VK_CONTROL )
::GoBottom()
else
::PageDown()
endif
otherwise
return Super:KeyDown( nKey, nFlags )
endcase
return 0
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Otto,
> Where I have problems is with the up,down,left,right-keys.
> Do I have to change twindow?
You have to define Method KeyDown() for your news class. There is no need to modify TWindow.
I can't download: You find my code on http://www.atzwanger.com/invoice/invoiceFor Antonio.zip
Please provide a valid link. Thanks.
> Where I have problems is with the up,down,left,right-keys.
> Do I have to change twindow?
You have to define Method KeyDown() for your news class. There is no need to modify TWindow.
I can't download: You find my code on http://www.atzwanger.com/invoice/invoiceFor Antonio.zip
Please provide a valid link. Thanks.
Hello Antonio,
sorry for the wrong link.
I hope thisone works:
http://www.atzwanger.com/invoice/invoiceForAntonio.zip
At the moment it is only a programm not a class - I don't know how to make one - and I tried with:
oPanelBody:bkeyChar := {|nKey|Msginfo(str(nKey))}
But I get no value for the arrowkeys.
regards
Otto
sorry for the wrong link.
I hope thisone works:
http://www.atzwanger.com/invoice/invoiceForAntonio.zip
At the moment it is only a programm not a class - I don't know how to make one - and I tried with:
oPanelBody:bkeyChar := {|nKey|Msginfo(str(nKey))}
But I get no value for the arrowkeys.
regards
Otto
Hello Antonio,
thank you for your help.
Now I can do what I want.
Only a little problem still exists:
I don't know how to use: WS_TABSTOP style
so I tried to do it with the VALID case.
This way I can't return from what I call panelBody to the panelHeader with the keyboard.
Regards,
Otto
http://www.atzwanger.com/invoice/invoic ... 051226.zip
thank you for your help.
Now I can do what I want.
Only a little problem still exists:
I don't know how to use: WS_TABSTOP style
so I tried to do it with the VALID case.
This way I can't return from what I call panelBody to the panelHeader with the keyboard.
Regards,
Otto
http://www.atzwanger.com/invoice/invoic ... 051226.zip
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Hello Antonio,
I tried your suggestion and so fare it is working.
The only problem is how to switch between the address-panel and the browser-panel.
Could you please help me on that again.
LINK: www.atzwanger.com/invoice/invoiceForAntonio_2.zip
Thanks in advance
Otto
I tried your suggestion and so fare it is working.
The only problem is how to switch between the address-panel and the browser-panel.
Could you please help me on that again.
LINK: www.atzwanger.com/invoice/invoiceForAntonio_2.zip
Thanks in advance
Otto