Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create classes from columns & headers And add to
Message
From
29/12/2000 07:11:52
 
 
To
29/12/2000 04:55:16
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00457692
Message ID:
00457707
Views:
24
Hi!

This is a long story, try to read following carefully, because following are serious things we investigated during developing of our applications.

First of all, I do nto recommend you to try to make column class. This requires complex support and methodics of building grids, all of them are on the level of manual editing of VCX file as DBF table. Beleive me, the effort required is not worth enough. We reached good results, but we spent so much time for that that this is not beneficial at all.

Instead I recommend you to use AddProperty method to add new properties to column. You will not be able to write events code for column, however. BUT, this is not needed! In my grid class I made everything controlled by header class, grid and control in column.

You can make header class using class declaration on PRG file. You can also do this using manual editing of VCX file by opening it as DBF. However, make class in PRG file first to test it properly, and than move properties and methods code into VCX. VCX header class have benefit - you can drag and drop it from controls toolbar only the grid column and it will automatically replace VFP default header.

In our application column controlling made using header control. In INIT of header class we set also porperties of column.

As about column-specific events - most of them you can replace by something other. For example, moved and resized events of column you can simulate using Click event of header. Store old values of columnorder and with properties of column somewhere in the properties of header, in Click event compare them with current. If column size changed - you have resized event for column, if column order changed - you have column moved event. The same approach could be used to many other things.

HTH.

>how to create classes from columns & headers And add to grid ?
>I want to add properties to the columns & header as the application will be used in there languages
> the fontnames, fontsize, captions and current language properties are added to each object. The gird
>adds the default header & column class.
>Rajesh
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform