Print Page | Close Window

lost focus event from a user control

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=5968
Printed Date: 07 July 2024 at 5:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: lost focus event from a user control
Posted By: tomamoss
Subject: lost focus event from a user control
Date Posted: 03 January 2007 at 1:55am

Hi

I am losing the lost focus event from a user control.

To demonstrate I took your sample SDISample.vbp and replaced the

TxtContent control with just a simple user control with a textbox in it.

 

If you trap the lost focus event you will see that it will fire the first and second time you leave the control, but from then on no events at all.

 

Any help would be most welcome

 

Thanks and kind regards

 

Tom



Replies:
Posted By: Oleg
Date Posted: 03 January 2007 at 2:04am
Hello,
You can use Activate and Deactivate actions instead.


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


Posted By: tomamoss
Date Posted: 04 January 2007 at 3:32am

Hi

 

Thanks for replying.
 

There is no Deactivate event for a user contol. But there is for the form the user contol sits on.

In your sample example its the frmPane Deactivate event.

howerver this suffers from the same problem, in that it only fires twice and then no more.

 

Your help in this matter would be greatly welcome.

 

Thanks

 

Mark



Posted By: Oleg
Date Posted: 04 January 2007 at 6:06am
Hi,
 
Here code you can try:
 
Private Sub DockingPaneManager_Action(ByVal Action As XtremeDockingPane.DockingPaneAction, ByVal Pane As XtremeDockingPane.IPane, ByVal Container As XtremeDockingPane.IPaneActionContainer, Cancel As Boolean)
   
    If (Action = PaneActionActivated) Then Debug.Print Pane.Title; " Activated"
    If (Action = PaneActionDeactivated) Then Debug.Print Pane.Title; " Deactivated"
End Sub


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


Posted By: tomamoss
Date Posted: 04 January 2007 at 7:43am

Hi

 

Thanks again for the reply.

I did try the example, but have run into a problem.

I need to verify that data entered into a form is correct before the focus is moved from a form that’s located with in a pane.

 

If I use the example you give and call a procedure with in my existing form to verify, and this displays a message box warning the user of a data problem the app will crash. no error just crashes.

I call the procedure from with in the DockingPaneManager_Action event.

 

Is there a problem with lost focus events with the DockingPane ocx, as it works twice just fine and the just swallows any further events.

 

 

Thanks for your time on this.

 

Kind Regards

 

Mark



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