Hiba_t
16th February 2006, 17:08
Hi all,
I'm writing a display session where users can mark some records while the ctrl button is pressed..
My question is, is there a way to be able to know if the ctrl button was pressed or not in the after choice section for choice.mark.occur..
Thanks,
Hiba
NvpBaaN
16th February 2006, 17:42
Hi Hiba,
I don't think there is a way to know if the ctrl button was pressed. But if you observe, you cannot mark multiple records without pressing ctrl (or shift for marking a range of recs). So if multiple records are marked (which of course you know in after.choice), it means either ctrl or shift was pressed...
Don't know whether this will solve your problem...but try...
Regards.
NPRao
16th February 2006, 20:36
is there a way to be able to know if the ctrl button was pressed or not in the after choice section for choice.mark.occur..
Refer to the link - Event Array Parameters (http://www.baanboard.com/programmers_manual_baanerp_help_events_event_array_parameters)
Keypress events
EVTKEYPRESS
evt.keypress.key( event )
ASCII or TSS value of pressed key.
evt.keypress.state( event )
Indicates which modifier keys are held down while the key is being pressed. Possible values are:
MOD_CTRL
MOD_SHIFT
MOD_ALT
Hiba_t
17th February 2006, 08:20
Thanks for your suggestion but I'm talking about a 4gl script, how can I catch the event in 4gl so that to call evt.keypress.key and evt.keypress.state ?
I don't think I can..
It's just that sometimes the user uses ctrl and sometimes he does not for selection and I need to know when is each case.. Can you help ?
en@frrom
17th February 2006, 11:01
Hiba, You CAN use these event trigger functions in a 4GL script. If you give us more specification as to your exact requirements, I am sure we will be able to help more...
Regards,
En
Hiba_t
17th February 2006, 11:18
I simply need to be able to know each time the user marks a record, if he pressed on ctrl when he chose it or not..
Since the code that should run in after.choice for mark.occur choice is different when ctrl is clicked..
mark_h
17th February 2006, 15:41
Well - I am not sure if you can tell when cntl is pressed, but the first thought that jumped into my head is "buttons". I have one session where the user marks records - then they have different buttons for what they want to happen(in this case I do not worry how the records got selected). Not sure if this is an option, but thought I would suggest it. This would also keep the user from thinking - did I push control or not?.