Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the Resize Method on a Dynamically created Grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00460425
Message ID:
00460551
Views:
12
>I have created a grid on a form with 1 Column and and have added extra columns by setting the ColumnCount property of the grid at runtime. When I try to set the Resize Method I am told that it is read only. Is there a way around it?
>
>TIA

In a PRG, create a column class:
define class GridColumn as column
   procedure Init
      ** optional init code here
      ** add any other procedures you want as well
   endproc
   procedure Resize
      ** Your resize code here
   endproc
enddefine
In the form, add columns as needed:
set procedure to name_of_prg_with_column_class additive set
with ThisForm.Name_of_Grid
   .AddObject("Column2", "GridColumn")
   .Visible = .t.
endwith
release procedure name_of_prg_with_column_class
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform