` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

ABC: Template to add tooltips to EIP fields
1999-08-13 -- Dennis E. Evans
 
Newsgroups: topspeed.products.c5pe Hi all, The template, see below, will add the tool tip, req, cap, upr and high low range limits (spin controls) to the fields on a browse. One note, the copy below has 3 AT statements. So it will only add the attributes for three fields, to add more fields copy the AT statements and change the constant value from 1, 2, 3 to 4, ...x The one I use has 15, I seldom if ever have a browse with that many EIP fields. Maybe someone can find a way to accomplish the task with one at statement. The only way I found to use one AT was to add a code template to each embed for each field, a bigger PITA than having one template with several at commands. I wanted to add one template and let it handle all the fields. Anyway, this is the only way I could get it to work, not very pretty but it does function. usage: Register normally, add the fields you want to set the attributes on to the Column specific add the template to the UpdateBrowseButtons There are no prompts for the template, it loops through the list of fields added in the Column Specific list and then pulls the info from the dictionary. Hope it helps Dennis Can you "Carry the message to Garcia?" #Template(EIPAttributes, 'Add Dictionary Attributes to EIP'),family('ABC') #! #extension(EipAttr, 'Add the CAP, REQ, UPR, TIP attributes to EIP Fields'),REQ(BrowseUpdateButtons(ABC)) #atstart #declare(%Temp, string) #declare(%Holder, string) #declare(%FieldsToAddAttr, string),multi #for(%EditInPlaceList) #add(%FieldsToAddAttr, %EditInPlaceField) #endfor #endat #at(%EditInPlaceManagerMethodCodeSection,%ActiveTemplateParentInstance,1,'CreateControl','()') #insert(%AddAttributes) #endat #at(%EditInPlaceManagerMethodCodeSection,%ActiveTemplateParentInstance,2,'CreateControl','()') #insert(%AddAttributes) #endat #at(%EditInPlaceManagerMethodCodeSection,%ActiveTemplateParentInstance,3,'CreateControl','()') #insert(%AddAttributes) #endat #! ---------------------------------------------------------------------------------------- #group(%AddAttributes),auto #! loop thru the fields added and test for a match #for(%FieldsToAddAttr) #set(%Holder, %FieldsToAddAttr) #if(%Holder = %EditInPlaceField) #find(%Field, %EditInPlaceField) ! set EIP field attributes ------------------------------ #case(%FieldValidation) #of('NONZERO') #! does nothing in EIP, add validation Self.Feq{prop:req} = true #of ('INRANGE') #! if range set add limits, for spin controls #if(%FieldRangeLow) #! is low end set Self.Feq{prop:rangelow} = %FieldRangeLow #endif #if(%FieldRangehigh) #! is high end set Self.Feq{prop:rangehigh} = %FieldRangeHigh #endif #endcase #for(%FieldScreenControl) #set(%temp, extract(%FieldScreenControl, 'CAP')) #! cap present #if(%temp) Self.Feq{prop:cap} = true #endif #set(%temp, extract(%FieldScreenControl, 'UPR')) #! UPR present #if(%temp) Self.Feq{prop:upr} = true #endif #set(%Temp, extract(%FieldScreenControl, 'TIP', 1)) #if(%Temp) Self.Feq{prop:tip} = %Temp #endif #endfor ! End EIP Attributes ------------------------------------ #break #endif #endfor


Today is December 3, 2024, 11:48 am
This article has been viewed 35400 times.
Google search has resulted in 19 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: