Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - [SOLVED] GroupBox breaking CausesValidation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] GroupBox breaking CausesValidation

 Post Reply Post Reply
Author
Message
daveb600Codejock View Drop Down
Newbie
Newbie


Joined: 30 November 2011
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote daveb600Codejock Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] GroupBox breaking CausesValidation
    Posted: 30 November 2011 at 11:07am
Hi,

I have an issue where my custom user control, when placed on a group box, does not apply its validate event correctly (i.e. cancel = True to stop focus move).  When the control is placed on a frame or on the form it validates correctly.

I'm using version 13.4.2 but have tried it on 15.0.2.

The issue only manifests itself when the control is on a GroupBox AND the button is a PushButton. If either or both are standard VB6 controls then there is no issue.

The event order when the frame is a VB6 frame and button is standard or codejock is 
TestControlFrame: UserControl_EnterFocus
TestControlFrame: txtData_GotFocus
TestControlFrame: txtData_Validate

But the event order when the frame is codejock and the button is standard or codejock is
TestControlGroupBox: UserControl_EnterFocus
TestControlGroupBox: txtData_GotFocus
TestControlGroupBox: txtData_LostFocus
TestControlGroupBox: UserControl_ExitFocus
TestControlGroupBox: txtData_Validate
TestControlGroupBox: UserControl_EnterFocus
TestControlGroupBox: txtData_GotFocus
The difference with this one however is that the codejock push button will execute the VB6 one will not.

I think that it is something to do with the CausesValidation property.  Its like the group box is killing it.

I cannot use the standard VB6 frame however as the codejock group box fixes an intermittent paint issue when clicking on a frame and custom controls disappearing.  I also cannot replace the buttons as they all have icons now.

I've attached a very simple example of this in action. uploads/7217/ControlValidationIssue.zip
Note. Do not click between the user controls as this will get stuck in a validation loop.
Note. The user control and app must be compiled (and run using this) to correctly highlight the issue.

I've tried placing the button in a frame, groupBox and pictureBox but this had no effect. I also tried placing the usercontrol text box which does the validation in a frame, groupBox and pictureBox as well.

Has anyone got any ideas?  

This is for an app where a custom user control is used to force correct selection of data. We're starting to get lots of issues on our support desk where users have managed to enter invalid data because of this.  Its taken me three days to figure this out so I'd take any solution at the moment :o)  (Other than replace all the pushButtons / GroupBoxs)

Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2012 at 5:55am
Comes back to a similar issue I had with the CommandBars and custom codejock controls being placed on there.. they didn't work, but standard vb6 ones did!
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2012 at 3:02am
Hi,

this has been fixed for the next release.

Andre

Codejock support
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.