dbTalk Databases Forums  

setVChar / keyPhysical

comp.databases.paradox comp.databases.paradox


Discuss setVChar / keyPhysical in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
marco
 
Posts: n/a

Default setVChar / keyPhysical - 12-21-2006 , 02:17 AM






pdx7, wxp, touchscreen (no keyboard)
i need a button which emulate vk_return
pdx help for setVChar send me to setAltKeyDown example (see at the end).
In a pushbutton method i put the following code
var
ke KeyEvent
f form
endVar
message()

if not f.attach("Restaurant") then
errorshow()
endif
ke.setVChar(VK_return)
f.keyPhysical(ke) errorshow()

and nothing happens. I could use instead something like
ui.action(moveright) but dont really like it...
thanks
marco

------------------------------------setAltKeyDown example-------------
The following example assumes a form has a box named boxOne. When the
user presses Alt+C, the keyPhysical method for the form changes the
color of boxOne. This code is attached to a form's keyPhysical method:

; thisForm::keyPhysical
method keyPhysical(var eventInfo KeyEvent)
if eventInfo.isPreFilter()
then
; code here executes for each object in form
if eventInfo.isAltKeyDown() and ; if user presses Alt+C
eventInfo.vChar() = "C" then
disableDefault ; block normal processing
; alternate a boxOne's color between red and blue
boxOne.color = iif(boxOne.color = Red, Blue, Red)
endif
else
; code here executes just for form itself
endif
endMethod

To simulate pressing Alt+C, the code for this method creates a KeyEvent
variable, then sets its virtual key character to "C" and sets the Alt
key down.

; sendAltC:ushButton
method pushButton(var eventInfo Event)
var
ke KeyEvent
endVar
ke.setVChar("C") ; set the character to C
ke.setAltKeyDown(Yes) ; set the Alt key state to pressed
thisForm.keyPhysical(ke) ; send off the event
endMethod

Reply With Quote
  #2  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: setVChar / keyPhysical - 12-21-2006 , 02:43 AM






Marco
<<
i need a button which emulate vk_return
Quote:
active.action(FieldEnter) or uiObject.action(FieldEnter) should do it.

--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply


Reply With Quote
  #3  
Old   
marco
 
Posts: n/a

Default Re: setVChar / keyPhysical - 12-22-2006 , 12:17 PM




Quote:
active.action(FieldEnter) or uiObject.action(FieldEnter) should do it.
tack och god jul!


Reply With Quote
  #4  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: setVChar / keyPhysical - 12-22-2006 , 02:50 PM



marco
<<
tack och god jul!
Quote:
and a Happy New Year to you!

--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"marco" <n_sp_hum_marco.foglia (AT) tucsoft (DOT) com> skrev i meddelandet
news:458c2122$1_5 (AT) news (DOT) bluewin.ch...
Quote:
active.action(FieldEnter) or uiObject.action(FieldEnter) should do it.
tack och god jul!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.