Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy control from one grid column to another
Message
 
To
30/12/1998 05:59:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00171287
Message ID:
00172496
Views:
26
Thanks for your reply. My situation is I've already built the grid and added textbox controls to the columns, and added code to the textboxes.

I was hoping for some combination of {ctrl}-x and {ctrl}-p!

>1- Code a builder. Base command is aselobj() to get the reference to the control. Then you add to desired columns same object type and set PEM via code. Not easy as it sounds.
I think this is my only hope for this case. I guess I can use the Column's AddObject method, then ReadMethod and WriteMethod calls to programatically copy the method code from the existing text box to the new one. Yuck. (Sounds like a utility in the making ...)

Or is there a better way?

2- Save as class your control, and add that new class to desired columns. Smart way but might lead to unnecessary class definitions.
>3- Design your new control outside of grid (temporarily on form) and set PEM there (except controlsource), Ctrl+C it, go to grid to edit, select desired columns one by one and paste. Delete temporary form control.
----------
Mark Bucciarelli
Previous
Reply
Map
View

Click here to load this message in the networking platform