||Re: function keys label F2 to F9
Akshat Kapoor <email@example.com>
||Tue, 6 Aug 2019 12:06:18 +0530
On 31/07/2019 03:30, Ken Mayer wrote:
> On 7/30/2019 9:20 AM, Mustansir Ghor wrote:
>> Dear All
>> I am using Editor control to edit a memo field. I wish to use Function
>> label key to shorten typing for more frequently used quotes. However
>> it does not function, I mean It does not write text assign to these keys.
>> Can anybody guide me on this matter
> Try the following. Using the onGotFocus event handler for the editor
> control, the purpose of F2 and F3 are changed (see code below). When the
> editor loses focus, they are returned to default settings ...
> // copy and paste to mustansir_edit.wfm
> ** END HEADER -- do not remove this line
> // Generated on 07/30/2019
> parameter bModal
> local f
> f = new mustansir_editorForm()
> if (bModal)
> f.mdi = false // ensure not MDI
> class mustansir_editorForm of FORM
> with (this)
> metric = 6 // Pixels
> height = 470.0
> left = 273.0
> top = 92.0
> width = 402.0
> text = ""
> this.EDITOR1 = new EDITOR(this)
> with (this.EDITOR1)
> onGotFocus = class::EDITOR1_ONGOTFOCUS
> onLostFocus = class::EDITOR1_ONLOSTFOCUS
> height = 295.0
> left = 7.0
> top = 63.0
> width = 388.0
> value = ""
> this.TEXT1 = new TEXT(this)
> with (this.TEXT1)
> height = 26.0
> left = 12.0
> top = 16.0
> width = 239.0
> text = "Editor / Keyboard test for Mustansir"
> this.TEXT2 = new TEXT(this)
> with (this.TEXT2)
> height = 33.0
> left = 12.0
> top = 389.0
> width = 335.0
> text = "Type some text in editor, press F2 or F3 ..."
> function EDITOR1_onGotFocus()
> // when editor has focus, change purpose of F2 and F2 keys:
> on key label f2 keyboard " F2 Key was pressed."
> on key label f3 keyboard " Just pressed F3."
> function EDITOR1_onLostFocus()
> // clear key settings:
> on key label f2
> on key label f3
> // end of code sample
Mustansir Please go through the above post.
In case your newsgroup reader has missed the post.
My thunderbird does miss posts sometimes.