Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text box of a grid
Message
De
07/02/2007 08:40:07
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
07/02/2007 06:39:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01193120
Message ID:
01193176
Vues:
23
This message has been marked as the solution to the initial question of the thread.
Hi Marcia and Ali,

Marcia's way can't let you customize your grid at design time. write that class as .prg file and add your grid as memberclass:

Note:This is my own class. You should make some changes to adopt for your grid...
*-------------- column class --------------
DEFINE CLASS _column as Column
  headerclasslibrary="column.prg"
  headerclass="_header"
  xorder=""
  ADD OBJECT _textbox as _textbox
  currentcontrol="_textbox"
  sparse=.t.


PROCEDURE Init

ENDPROC

PROCEDURE Destroy

ENDPROC

PROCEDURE Error(nError, cMethod, nLine)

ENDPROC

ENDDEFINE

*-------------- header class --------------
DEFINE CLASS _header as Header 
   alignment=2
PROCEDURE Init

ENDPROC

PROCEDURE Destroy

ENDPROC

PROCEDURE Error(nError, cMethod, nLine)

ENDPROC

PROCEDURE click 
   IF EMPTY(this.Parent.xorder)
     RETURN
   ENDIF 
      SELECT (this.Parent.parent.recordsource)
LOCAL xascmi
  xascmi=UPPER(this.Picture)='pic\_SORTASC.BMP'
        this.Parent.parent.setall("Picture","")
IF ORDER()=UPPER(this.Parent.xorder)
   IF m.xascmi
        this.Picture='pic\_SORTDES.BMP'
        SET ORDER TO (this.Parent.xorder) DESCENDING 
   ELSE
        this.Picture='pic\_SORTASC.BMP'
        SET ORDER TO (this.Parent.xorder) ASCENDING 
   ENDIF 
   
ELSE   
        SET ORDER TO (this.Parent.xorder) ASCENDING 
        this.Picture='pic\_SORTASC.BMP'
ENDIF         
        this.Parent.parent.refresh 
ENDPROC   

ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform