Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
ABC: Using FileDropCombo in EIP 1999-01-11 -- Bob Gaucher Newsgroups: topspeed.products.c5ee
Yes I Know most of this is also in the manuals, but here it is in
one spot.
Adding FileDropCOMBO functionality to EditInPlace. Yes I know most of this is also in the manuals, but here it is in one spot. Adding FileDropCOMBO functionality to EditInPlace. After selecting Configure Edit In Place, Select Column Specific. Select the field in the Browse you wish to use. Click Use Application Builder Class?,and select EditDropListClass. Since there is no EditDroListComboClass we will add functionality to the EditDropListClass to get the desired results. Normally, the EditDropListClass is filled from a queue. The name of our queue is NameQ. It contains one field called NameQ.Name. Let's assume that you have a file called Names.TPS that contains a list of names that the user can update. We also have a Key called NAM:Kname using the field NAM:Name. We have another browse that contains personnel records that we want to use Edit in Place on called People.TPS. On the field PEO:Name in the People.TPS file you want to use a FileDropCombo as an edit in place. At Windows Events.OpenWindow Embed CLEAR(NameQ) SET(PEO:Kname) Loop While NOT Access:Names.Next() AND NOT Access:Names.GetEOF() NameQ.Name = NAM:Name ADD(NameQ) END This fills the queue so that our drop list has data to use. Now we modify the EditDropListClass into an EditDropListCOMBO. Embed in Create Control before the Parent call SELF.FEQ = CREATE(0,CREATE:DropCOMBO) Assert(~ErrorCode()) RETURN This tells it to create a drop COMBO instead of the DropList. Embed in Init Procedure after Parent Call SELF.FEQ{PROP:FROM} = NameQ SELF.FEQ{PROP:TEXT} = ListBox{PropList:Picture,FieldNumber} SELF.FEQ{Prop:DROP} = 10 SELF.FEQ{PROP:WIDTH} = 80 SELF.FEQ{PROP:Vscroll} = 1 SELF.FEQ{Prop:Format) = ‘25L@s10@_’ SELF.FEQ{PROP.CAP} = 1 This tells the drop list where to get its data (PROP:FROM) and adds some class to the drop list. Embed in Take Event PROCEDURE LOOP X# = 1 to RECORDS(NameQ) GET(NameQ,X#) IF PEO:Name = NameQ.Name THEN BREAK . END IF X# > RECORDS(NameQ) NameQ.Name = PEO:Name ADD(NameQ) END This adds a new name that we might type in into our queue NameQ. Embed in Kill PROCEDURE with a Priority 1 LOOP Y# = 1 to RECORDS(Names) GET(Names,Y#) IF PEO:Name = NAM:Name THEN BREAK. END IF Y# > RECORDS(Names) NAM:Name = PEO:Name ADD(Names) END This adds the new name we entered into our TPS file Names so that it will fill the queue the next time we want to add a new record or change a record to our People browse. Bob Gaucher Yes I Know most of this is also in the manuals, but here it is in one spot. Adding FileDropCOMBO functionality to EditInPlace. After selecting Configure Edit In Place, Select Column Specific. Select the field in the Browse you wish to use. Click Use Application Builder Class?,and select EditDropListClass.
Since there is no EditDroListComboClass we will add functionality to the
EditDropListClass to get the
Normally, the EditDropListClass is filled from a queue. The name of
our queue is NameQ.
At Windows Events.OpenWindow Embed
This fills the queue so that our drop list has data to use. Now we modify the EditDropListClass into an EditDropListCOMBO. Embed in Create Control before the Parent call
This tells it to create a drop COMBO instead of the DropList. Embed in Init Procedure after Parent Call
This tells the drop list where to get its data (PROP:FROM) and adds
some class to the drop list.
Embed in Take Event PROCEDURE LOOP X# = 1 to RECORDS(NameQ)
This adds a new name that we might type in into our queue NameQ. Embed in Kill PROCEDURE with a Priority 1 LOOP Y# = 1 to RECORDS(Names)
This adds the new name we entered into our TPS file Names so that it
will fill the queue
Today is November 21, 2024, 3:29 am This article has been viewed 35397 times. Google search has resulted in 80 hits on this article since January 25, 2004.
|
|