Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text box of a grid
Message
 
To
07/02/2007 08:40:07
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01193120
Message ID:
01193220
Views:
6
>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
>
Hi ALL
and thank you that answer my question my problem solved. i did what Metin Emre said.
Thank you again.
Ali Mohammad Hossein Zadeh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform