Hi everyone,
I have a field with a prompter; I need to pass to it some information (File key) in order to make a correct selection.
Is there a general way to communicate or to pass information to a prompter?
I know that I can use prompterxxx events on fields, but these events are not present in Grid.
Thank you in advance
Windows Prompter on Grid
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Windows Prompter on Grid
The simplest technique I think is to add a property to the prompter form and then set the value in the PrompterActivate event
For example, my Prompter Form is called "MyPrompterForm" and I've defined a property as follows. When the value is set, the list is loaded
In the form where it's used, the processing would look like this
The Form parameter of the event provides access to the instance of the prompter form. We can then cast this to the class required which gives access to the Key property.
For example, my Prompter Form is called "MyPrompterForm" and I've defined a property as follows. When the value is set, the list is loaded
Code: Select all
Define_Pty Name(Key) Set(SetKey)
Ptyroutine Name(SetKey)
Define_Map For(*Input) Class(#Prim_Alph) Name(#Property)
Clr_List Named(#List)
Select Fields(....
Add_Entry To_List(#List)
Endselect
Endroutine
Code: Select all
Evtroutine Handling(#Grid.PrompterActivate) Form(#Prompter)
(#Prompter *As #MyPrompterForm).Key := #KeyField
Endroutine
Re: Windows Prompter on Grid
Thank you very much!
It solved our problem
Best regards
It solved our problem
Best regards