Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic alternative to CreateBox method (Read 3372 times)
Shoop
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Jan 20th, 2006
alternative to CreateBox method
Jan 20th, 2006 at 6:33pm
Print Post  
(sorry...but this might be a noob question)

Is it possible to create a box, modify it's properties, then add it to the flowchart?

The only way that I see to create a box is to use the flowchart's CreateBox method which seems to create a box then selects the box within the flowchart before allowing it's properties to be modified.

This is a problem for me though, because I'm using the Flowchart's BoxSelected event to trigger code that reads the VariantTag property of the box.

If the box is added to the flowchart (and therefore triggering the BoxSelected event), I don't have a chance to set the VariantTag property beforehand.

I still want the box (once added to flowchart) to be selected...so somehow disabling the flowchart's auto-select when new box created (or however this works) wouldn't be an option.

I guess I'm asking if something like this is possible:

dim oBox as new box
oBox.top = 100
oBox.bottom = 100
oBox.VariantTag = "foobar"
...
oFlowchart.Add(oBox)

Any help would be appreciated.  thx
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: alternative to CreateBox method
Reply #1 - Jan 20th, 2006 at 7:11pm
Print Post  
Hi,

There isn't any other way to create a box, so try disabling auto-selection temporarily:

fc.SelectAfterCreate = false
set box = fc.CreateBox ...
box.VariantTag = "foobar"
fc.SelectAfterCreate = true

And if you would like the new box to be selected, call

fc.AddToSelection box

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Shawn Hooper
Guest


Re: alternative to CreateBox method
Reply #2 - Jan 21st, 2006 at 3:01pm
Print Post  
Smiley  This will work.  Thanks for the quick reply!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint