` Printed Icetips Article

Icetips Article



ABC: Forcing upper case in EIP
1999-01-20 -- Jim Kane
 
Newsgroups: TopSpeed.Topic.Templates

> Is there any way that we can force a particular field in an edit in
> place list to be entered uppercase only?  Whilst on the subject, is
> there any way that we can have a file loaded drop down list on an edit
> in place field?

Yup, especially in C5. The trick is getting abc to generate the
EditEntryClass so you can put some code in the virtual. To do that,
press Configure Edit in Place on the browse.  Then press column specific
button. Then press insert to insert the column(s) you want to
customize. Then backout, save and generate. Then open the procedure in
the embeditor. Like magic a class appears for every field you need to
customize:

EditInPlace::PRE:YOURFIELD CLASS(EditEntryClass)
CreateControl          PROCEDURE(),VIRTUAL

Next search thru the code for the createcontrol method. After the call
to parent.createcontrol (that's when the control is created and the FEQ
defined) you can have your way with the control:
EditInPlace::TES:astring.CreateControl PROCEDURE

! Start of "Edit-In-Place Manager Method Executable Data Section"
! [Priority 5000]

! End of "Edit-In-Place Manager Method Executable Data Section"
  CODE
  ! Start of "Edit-In-Place Manager Executable Code Section"
  ! [Priority 2500]

  ! Parent Call
  PARENT.CreateControl()
  ! [Priority 7500]
  If SELF.FEQ then SELF.FEQ{prop:upr}=1.
  ! End of "Edit-In-Place Manager Executable Code Section"

You can get as fancy as you want.  The above makes it upper case.

---
Jim Kane



Printed November 23, 2024, 6:02 am
This article has been viewed/printed 35379 times.
Google search has resulted in 19 hits on this article since January 25, 2004.