Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid--which column do I have?
Message
From
24/06/1999 22:21:46
 
 
To
24/06/1999 09:50:17
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00233472
Message ID:
00233804
Views:
28
>In VFP 6.0, if I have an object reference to a grid column, is there any property that can tell me which column I have? If the columns are movable, the ColumnOrder property is not useful (since it gives current position which changes when the user moves the column). I could use the column name, if necessary, but this solution is not ideal because it imposes a requirement on the naming of columns.
> Thanks, Chaim




Well, even for VFP5, (actually I haven't upgrade to 6.0)
there are some property to handle child objects...

For Example,
* Grid1.init()
With This
  For ix = 1 to .ColumnCount
    .Columns[ix].RemoveObj("text1")
    .Columns[ix].AddObject("Text1", "myTxt")
    .Columns[ix].Text1.visible = .T.
    .Columns[ix].Text1.fontsize = 12
    .Columns[ix].Text1.fontname = "Arial"
    * ......
  EndFor
End With


Besides, there are some similar count and array property to do...
Forms[]    ~~ FormCount     -- Formset
Controls[] ~~ ControlCount  -- Form, Container, Toolbar, Page, Column
Buttons[]  ~~ ButtonCount   -- OptionGroup, CommandGroup
Pages[]    ~~ PageCount     -- PageFrame
Columns[]  ~~ ColumnCount   -- Grid
So, you can make a Recursive Function to get all objects into a single simple array.... ^_~
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform