Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add custom Grid Hdr class and transfer Props/Mthds from
Message
From
20/10/2005 06:41:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01060429
Message ID:
01060632
Views:
20
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>I could get the following code to work, but alas I am not sure how to transfer all the properties / methods (if defined) from the original header class to the just replaced class. Plus note, I cannot also reuse the name of the original header. This grid is predefined grid I just want to replace the header class for OOPism. Please advise.
>
>
FOR EACH loColumn IN THIS.COLUMNS
>   FOR EACH loObj IN loColumn.CONTROLS
>      IF loObj.BASECLASS = "Header"
>         lcName = loObj.NAME
>
>         loColumn.REMOVEOBJECT(loObj.NAME)
>         loColumn.ADDOBJECT(lcName+"a", "ihdrGridHeader")
>      ENDIF
>   ENDFOR
>ENDFOR
Why don't you do this at designtime if you're going to write method code. At designtime also you could use ReadMethod, writemethod.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform