Form properties 
Author Message
 Form properties

I have a MDI form with a tree view displayed down one side when the user
click on a node on the treeview I want a childform with a corresponding
value in the Tag property, to the node's key to be loaded, and any currently
loaded child form to be removed.

At the moment I have tried doing this by the following:

    Dim ctl As Form

    For Each ctl In cScreens
          If ctl.Tag = Node.Key Then
             ctl.Show
          Else
             ctl.Hide
          End If
    Next ctl

But this actually loads each form to check the Tag property, is there a way
to look at the tag without loading it each time the user clicks a node. Or a
better way of doing this?



Mon, 04 Sep 2000 03:00:00 GMT
 Form properties

This happens because everytime you reference a form's property the respective
form is loaded (other way how the property would be evaluated?).

Quote:

> I have a MDI form with a tree view displayed down one side when the user
> click on a node on the treeview I want a childform with a corresponding
> value in the Tag property, to the node's key to be loaded, and any currently
> loaded child form to be removed.

> At the moment I have tried doing this by the following:

>     Dim ctl As Form

>     For Each ctl In cScreens
>           If ctl.Tag = Node.Key Then
>              ctl.Show
>           Else
>              ctl.Hide
>           End If
>     Next ctl

> But this actually loads each form to check the Tag property, is there a way
> to look at the tag without loading it each time the user clicks a node. Or a
> better way of doing this?

--
Cludio Avolio Rodrigues
Systems Especialist
IBM GS

Home page: http://www.geocities.com/SunsetStrip/4994

Please remove NOSPAN from username to reply.



Mon, 04 Sep 2000 03:00:00 GMT
 Form properties

How about using

   Dim ctl As Form

   For Each ctl In Forms
      If ctl.MDIChild then
        If ctl.Tag = Node.Key Then
           ctl.Show
        Else
           ctl.Hide
        End If
      End if
  Next ctl

Quote:

>I have a MDI form with a tree view displayed down one side when the user
>click on a node on the treeview I want a childform with a corresponding
>value in the Tag property, to the node's key to be loaded, and any
currently
>loaded child form to be removed.

>At the moment I have tried doing this by the following:

>    Dim ctl As Form

>    For Each ctl In cScreens
>          If ctl.Tag = Node.Key Then
>             ctl.Show
>          Else
>             ctl.Hide
>          End If
>    Next ctl

>But this actually loads each form to check the Tag property, is there a way
>to look at the tag without loading it each time the user clicks a node. Or
a
>better way of doing this?



Fri, 08 Sep 2000 03:00:00 GMT
 Form properties

It would sound as though the nodes and forms are static and that you
have manually polaced the Tag property for the forms.  If thats the
case, just write a simple sub in the general section of you main form.

Private Sub ShowForm(NodeKey as string)
Select Case NodeKey
Case "AAA"
  frmAAA.show
Case "BBB"
  frmBBB.show
End Select
End sub

Quote:

> I have a MDI form with a tree view displayed down one side when the user
> click on a node on the treeview I want a childform with a corresponding
> value in the Tag property, to the node's key to be loaded, and any currently
> loaded child form to be removed.

> At the moment I have tried doing this by the following:

>     Dim ctl As Form

>     For Each ctl In cScreens
>           If ctl.Tag = Node.Key Then
>              ctl.Show
>           Else
>              ctl.Hide
>           End If
>     Next ctl

> But this actually loads each form to check the Tag property, is there a way
> to look at the tag without loading it each time the user clicks a node. Or a
> better way of doing this?



Sat, 16 Sep 2000 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. How to reffer to a form property from another form

2. Possible to programatically add form property?

3. What form property makes buttons invisible?

4. Copying buttons between forms -- properties retained but event handler code lost

5. Help w/min-max button Form property?

6. Vfp6 - Combobox with form properties

7. VFP6 - combobox with form properties

8. reference form property in a function

9. Form properties

10. What Form | Properties | Zoom is active???

11. Can form properties be added programatically?

12. Newbie - Changing Form Properties


 
Powered by phpBB® Forum Software