Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a textbox class to a grid column
Message
 
 
To
19/12/2002 19:52:20
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00734746
Message ID:
00734795
Views:
14
Hi Oscar,
this code example shown below from my grid class part of Init event . it removes at runtime all textboxes from the grid and adding my own textbox class to all columns.
* grid init event
FOR EACH oColumn IN this.Columns
   WITH oColumn
      .RemoveObject('Text1')
      .NewObject('text1','GrdAddNew',this.ClassLibrary) &&grdaddnew my textbox class name
     .CurrentControl='Text1'
     .text1.visible=.t. 
     ENDWITH
ENDFOR
you can do this on your form and if you want you can apply this for some columns

eg. for grid init event
WITH this.Columns(4)
  .RemoveObject('Text1')
   .NewObject('text1','GrdAddNew',this.ClassLibrary) &&grdaddnew my textbox class name
    .CurrentControl='Text1'
    .text1.visible=.t. 
 ENDWITH
HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform