Automation column??? 
Author Message
 Automation column???

Hi,

I have created an control grid where I put some code to do some
automations....but now I have a problem with my columns...I would like to
put some code im my columns so that when I create a new column this code
will be used.

Ex:

grid1 -> is my grid
column1 -> is my first column in grid1
column2 -> is my second column in grid1
...
columnn -> is my n column in grid1

what I would like to do is:

in event dblclick in all columns created put some code.

So if a create a new column I want that new column have the same code as the
others!!!

How I do that? is possible?

Because now I do that but manually and is very boring.

TIA



Mon, 05 Sep 2005 20:40:37 GMT  
 Automation column???
You can do this in VFP8 where you can define Member classes for a Grid class
that will be used as soon as you add a column by changing the ColumnCount

In VFP7  you can use ASELOBJ to get an object reference to the grid you're
designing and programmatically insert the same code in every column using
the WriteMethod method in a loop through the Columns collection.
AselObj(aa) && the grid is selected at design time
oGrid= aa(1)
for each o in oGrid.Columns
 o.WriteMethod("DBLCLICK", "code to insert " )
Next

-Anders


Quote:
> Hi,

> I have created an control grid where I put some code to do some
> automations....but now I have a problem with my columns...I would like to
> put some code im my columns so that when I create a new column this code
> will be used.

> Ex:

> grid1 -> is my grid
> column1 -> is my first column in grid1
> column2 -> is my second column in grid1
> ...
> columnn -> is my n column in grid1

> what I would like to do is:

> in event dblclick in all columns created put some code.

> So if a create a new column I want that new column have the same code as
the
> others!!!

> How I do that? is possible?

> Because now I do that but manually and is very boring.

> TIA



Mon, 05 Sep 2005 21:32:08 GMT  
 Automation column???
Thanks Anders.


Quote:
> You can do this in VFP8 where you can define Member classes for a Grid
class
> that will be used as soon as you add a column by changing the ColumnCount

> In VFP7  you can use ASELOBJ to get an object reference to the grid you're
> designing and programmatically insert the same code in every column using
> the WriteMethod method in a loop through the Columns collection.
> AselObj(aa) && the grid is selected at design time
> oGrid= aa(1)
> for each o in oGrid.Columns
>  o.WriteMethod("DBLCLICK", "code to insert " )
> Next

> -Anders



> > Hi,

> > I have created an control grid where I put some code to do some
> > automations....but now I have a problem with my columns...I would like
to
> > put some code im my columns so that when I create a new column this code
> > will be used.

> > Ex:

> > grid1 -> is my grid
> > column1 -> is my first column in grid1
> > column2 -> is my second column in grid1
> > ...
> > columnn -> is my n column in grid1

> > what I would like to do is:

> > in event dblclick in all columns created put some code.

> > So if a create a new column I want that new column have the same code as
> the
> > others!!!

> > How I do that? is possible?

> > Because now I do that but manually and is very boring.

> > TIA



Tue, 06 Sep 2005 01:27:45 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. change one column and move it to another column

2. Detecting column in Multi-column reports

3. input data Column by Column under Grid

4. Adding Column with AddObject displaces columns

5. HELP - Accessing column values in multi-column ComboBox

6. Copy numeric column to new char column

7. Multi-column Combo w/SQL RowSource only displays one column

8. Combobox w/multiple columns shows wrong column

9. Automation of Word 97, SaveAs()

10. Word 97 OLE Automation error

11. VFP3.0 - Help using OLE Automation with Word95 FileClose function

12. How to detect closed Automation App from VFP6?

 

 
Powered by phpBB® Forum Software