Print Page | Close Window

Updating controls on a different form

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=881
Printed Date: 05 May 2024 at 11:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Updating controls on a different form
Posted By: Maui
Subject: Updating controls on a different form
Date Posted: 23 June 2004 at 5:23am

I am having a problem updating controls on a different form.

In my application I have a central form which contains items. The idea is that when you click on one of the items in the main form the docked windows will all update showing their respective data about the item you click on.

Here is an example of what I mean. This Sub has no result and I would expect it to update  label1 on the preview form with the word test.

Private Sub Command1_Click()
    formPreview.Label1 = "TEST"
    formPreview.Label1.Refresh
End Sub

I tried making the sub on the child window and then doing the call like this but it causes the program to crash.

Private Sub Command1_Click()
    formPreview.UpdateLabel
End Sub

Any help appreciated.

 




Replies:
Posted By: Oleg
Date Posted: 23 June 2004 at 1:20pm
formPreview is nothing I guess. You must use the form you attached to docking pane.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Maui
Date Posted: 23 June 2004 at 4:02pm

User Error

I had forgotten I was working with an instance of the form and not the form itself.

Time for me to rename my variables I think so I dont do this again.

 

Thank you for your help.

 

Public frmPanePreview As formPreview

 

I had this :

formPreview.Text1.Text = Now         

 

Now I have this:

frmPanePreview.Text1.Text = Now         

 

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net