Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding code to existing grid textboxes
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01241212
Message ID:
01241262
Views:
35
>>>Borislav,
>>>I agree that using my text box class is the best answer but the question is how to change out the existing text box on all columns in over a hundred grids?
>>
>>Are you use a Native GRID control (you are doomed if you do so), or you have your own one?
>
>All the grids are based on our base grid class but almost all were created with VFP 6.
That you could change you base Grid class and redefine the control youu sed in the columns to your own, on top of my head, put this in your Grid Base Class Init:
FOR EACH oCol IN this.Columns
    IF UPPER(oCol.CurrentControl.Class) == [TEXTBOX]
       oCol.NewObject([MyText],[YourTextBoxClass],[VCX wher class is defined])
       oCol.RemoveObject([Text1])
       oCol.CurrentControl = [MyText]
       oCol.MyText.Visible = .t.
   ENDIF
ENDFOR
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform