Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Put Boxes in a container (Read 1886 times)
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Put Boxes in a container
Sep 25th, 2008 at 1:25pm
Print Post  
another problem. I select some boxes and I want to put them in another container box.

This code doesn't work (only creates the box b1), but I'm able after executing it to put (manually) all boxes in the newly created container.
Code
Select All
procedure TForm_Main.cmdCreateAndPutInContainerClick(Sender: TObject);
var b1: box;
I: Integer;
begin

  b1 := flowchart1.CreateBox (100, 100, 100, 100);

  for I:=(flowchart1.SelectedBoxes.count)-1 downto 0 do
  begin
    flowchart1.SelectedBoxes[I].PutInContainer(b1);
  end;

end;
 


any suggestions?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Put Boxes in a container
Reply #1 - Sep 25th, 2008 at 3:26pm
Print Post  
Check the SelectAfterCreate value. If it is enabled, the SelectedBoxes collection will contain just b1 after calling CreateBox.
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Put Boxes in a container
Reply #2 - Sep 26th, 2008 at 7:47am
Print Post  
Right! Now it works...  Grin

Thank you again  Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint