` Printed Icetips Article

Icetips Article



Par2: Edit in Place: Adding a spin class
1999-01-09 -- Bob Gaucher
 
ADDING A NEW CLASS EDITSPINCLASS

Edit in Place has some very usefull features, EditDropClass, EditCheckClass, etc.  
One that is not there is an Edit Spin Class.

Here is how to add one.

Add to abeip.inc:

EditSpinClass
CLASS(EditClass),TYPE,MODULE('ABEIP.CLW'),LINK('ABEIP.CLW',_ABCLinkMode_)
,DLL(_ABCDllMode_)   ! This is all on one line
CreateControl       PROCEDURE,VIRTUAL,PROTECTED
SetAlerts           PROCEDURE,VIRTUAL
                  END

Add to abeip.clw
EditSpinClass.CreateControl PROCEDURE
  CODE
        SELF.Feq = CREATE(0,CREATE:Spin)  !This creates the
control

EditSpinClass.SetAlerts PROCEDURE
  CODE
     SELF.Feq{PROP:Alrt,5} = ''    ! The Edit Class Alerts
the up and down arrows. Spin Class need them to spin.
     SELF.Feq{PROP:Alrt,6} = ''


Embedd in EditSpinClass.Init Procedure  after Parent Call

SELF.FEQ{PROP:RangeLow}  = 1       ! This sets the low and
high range of the spin box. Put in your own values.
SELF.FEQ{Prop:RangeHigh}    = 999

That's it.  Now you have an EditSpinClass that will show up
on the list of ABC classes.



Printed November 21, 2024, 6:34 am
This article has been viewed/printed 35195 times.