Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Odd box creating problem (Read 1555 times)
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Odd box creating problem
Feb 12th, 2007 at 3:11pm
Print Post  
Good day,

I am having what seems to be a very odd problem with the creation of some boxes.

I set up a flowchart in the form.new event, and I load a set of boxes from a database in the form.load event.  My problem is that when I do a drag and drop of a shape on to the flowchart and create a shape with almost identical code some of the properties of the new box do not seem to work.

I am using the following code at the end of both the data driven box creation, and the D&D box creation:
               b.HandlesStyle = HandlesStyle.MoveOnly
               b.Constraints.KeepInsideParent = True
               b.Constraints.MoveDirection = DirectionConstraint.Horizontal
               b.Obstacle = True

The problem is that on the D&D create I can still - resize the new boxes, drag them anywhere on the flowchart (no movement restriction), and the "hatch outline" that is part of the MoveOnly does not seem to appear.

Any ideas?

Thanks,
Jeff
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Odd box creating problem
Reply #1 - Feb 12th, 2007 at 5:33pm
Print Post  
Good day,

It looks as if that code is not executed at all, or at least not for the expected box. Could you add a breakpoint at the

b.HandlesStyle = HandlesStyle.MoveOnly

line and see if the Drop handler hits it, and whether the "b" variable refers to the new box?

Stoyan
  
Back to top
 
IP Logged
 
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Re: Odd box creating problem
Reply #2 - Feb 12th, 2007 at 5:51pm
Print Post  
Thank you so much!!

It was a bug in my code.  I had an unhandled exception prior to the final box setup code that caused the drop routine to exit prematurely.

It only happened in the case where there was NOT an image associated with the box, so I didn't see that it was connected to the image loading code.

Jeff
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint