Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resizing Containers (Read 7189 times)
andrewsando1973
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Resizing Containers
Feb 26th, 2010 at 8:48am
Print Post  
I Hosted an activex textbox into a flowchart box, then i want to place this hosting box into a container so that i can work with its border colors ,....etc,
BUT i got two problems:

1) The container doesn't have resizing handles, so the user will not be able to resize it !!!

2) The contained box is placed at the bottom of the container, so how can i place it to the top left point so that the container is exactly the same size of the contained box?

Also, how can i let the user resize the container, then automatically the contained box is resized too?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resizing Containers
Reply #1 - Feb 26th, 2010 at 10:46am
Print Post  
The container auto-sizes to its content and you can let users resize it only by setting the SelStyle property to Custom and handling the HitTestSelHandles event. Instead containers you might try using a group with an ordinary box set as the master item and the activex box attached as subordinate item.

If the only reason you need this is to draw a border, we can easily add a property that runs the standard box drawing code for ActiveX boxes so you could use a single box instance.

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


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Re: Resizing Containers
Reply #2 - Feb 26th, 2010 at 12:11pm
Print Post  
Yes the only reason is to draw border.
but i didn't understand "we can easily add a property that runs the standard box drawing code for ActiveX boxes so you could use a single box instance."

can you please elaborate more or give me a sample code?

thanks in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resizing Containers
Reply #3 - Feb 26th, 2010 at 1:00pm
Print Post  
I mean our developer can add this as a new property of the Box class. Then you would enable it to make FlowchartX draw the standard box shape behind the hosted control.

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


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Re: Resizing Containers
Reply #4 - Feb 26th, 2010 at 1:42pm
Print Post  
wow, that is really great,

I hope you can inform me when the update is ready.

N.B. Also if your developers can allow the Hosting box to be rounded rectangle too, that will be awesome. (Only if possible)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resizing Containers
Reply #5 - Mar 2nd, 2010 at 2:07pm
Print Post  
Check the new DrawAxBoxShapes property in this version:

https://mindfusion.eu/_beta/flowchartx32.zip

You can use it like this:

Code
Select All
fcx.DrawAxBoxShapes = True
fcx.ControlPadding = 10

b1.AxControlId = "MSCAL.Calendar"
b1.Style = bsAxControl
b1.shape = fcx.Shapes("Decision") 



The bigger ControlPadding value, the more you will see from the underlying shape.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
andrewsando1973
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Re: Resizing Containers
Reply #6 - Mar 2nd, 2010 at 2:17pm
Print Post  
Thank you so much.

I will download it and try the new property today.

This means that i can draw the Ax hosting box the shape i want (rounded rectangle) and also i can change the color of the borders too.

That is really awesome.

Thanks again
(You really have the best online support on the web)
  
Back to top
 
IP Logged
 
andrewsando1973
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Re: Resizing Containers
Reply #7 - Mar 10th, 2010 at 6:02pm
Print Post  
I Tried the new feature of BoxDraw, it really draws the box of the AxControl, but the real problem is that the axcontrol in the box is shifted towards the Top Left Point.
This means that when i set the Padding = 0 the AxControl edges covers the top and left borders of the box while a gap is left between the hosted control and the bottom and right borders of the box.

Is there any solution for this?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resizing Containers
Reply #8 - Mar 11th, 2010 at 9:57am
Print Post  
It looks like some rounding error that draws one additional pixel to the right and bottom of the control. We'll try to fix this in the next few days. For now you might set box.FrameColorAlpha = 0 to hide the border of such boxes when padding is 0, or set larger PenWidth otherwise.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
andrewsando1973
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Re: Resizing Containers
Reply #9 - Mar 11th, 2010 at 10:14am
Print Post  
Thank you so much for your support.

I will keep the code as it is, till the issue is fixed.
I hope you can inform me when it is fixed.

Thanks in advance,
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint