Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Making copies of xxxItem (Read 3428 times)
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Making copies of xxxItem
Oct 2nd, 2007 at 2:10pm
Print Post  
Hello,

In using the FlowChart I am creating my own Property screens for the different objects. I've noticed that when I make a copy of an object anything I do to that copy translates automatically to the object on the FlowChart.

What I would like to do is to make a copy of the object which is independent of the object found on the FlowCtrl. This way if changes have been applied to the object being edited (Prop Screen) and have a quick way to restore it back to its original state.

Right now I've been creating a new object and copying each of the properties in order to accomplish the same thing.

Any thought?

Thanks for any help.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Making copies of xxxItem
Reply #1 - Oct 2nd, 2007 at 3:56pm
Print Post  
Hi,

You are using C++ and MFC, if I remember correctly? Assigning a MFC wrapper object to another simply copies the COM interface pointer, and does not clone the box object. So, you must really create a new object and copy the properties affected by the property screens. It's even better to create the new object in some off-screen FlowChart instance, to avoid creating undo/redo records in the primary flowchart.

Stoyan
  
Back to top
 
IP Logged
 
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Re: Making copies of xxxItem
Reply #2 - Oct 3rd, 2007 at 1:13am
Print Post  
Hi,

You are correct, I am using MFC and C++ to develop the application. Grin Your answer confirms what I figured was the best way to work with the objects.

In my case I am doing exactly what you are stating, I create a separate object on a FlowChart control which is displayed as a kind of "Try-Before-Committing" view of the object and copy the affected value changes if the user wants to. Makes the program function even better this way.

NEW ITEM: The only thing I am having trouble with now is how to work with Table objects. I have created a properties dialog box for the table object but, because of the way the Table object works I will also need to create a properties dialog box to work directly with the cells within the table object. Any suggestions?

One of the features I would love to see implemented is the one where the user can choose a cell and decide to span to another row or column. I would be nice if the cell(s) can be highlighted when the user select them for editing. If this can be done or is already done then it is not very obvious to me and I would like for you to point me in the proper direction.

Thanks for your accustomed help.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Making copies of xxxItem
Reply #3 - Oct 3rd, 2007 at 1:41am
Print Post  
Hi,

The cell properties are exposed as indexed properties of the Table class. I think MFC wraps them with Get/Set methods that take additional (column, row) argument.

Use the CellColumnSpan and CellRowSpan indexed properties to create cells that span more than one columns and/or rows.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Re: Making copies of xxxItem
Reply #4 - Oct 3rd, 2007 at 9:47am
Print Post  
Hi,

Thanks for the suggestion. At this moment I am trying to decide which would be the best way to display the cell properties and have the user choose to span rows or columns. Roll Eyes

If you (or anyone else) have any ideas or sample screenshots I could see I would appreciate it.

Thanks for your help. Grin

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Making copies of xxxItem
Reply #5 - Oct 3rd, 2007 at 10:20am
Print Post  
Hi,

Just an idea - you could represent the table through an additional flowchart, and for each table's cell create a Box. Then let users resize the bottom and right sides of the boxes to define the span width and height. Disable all other adjustment handles to prevent moving the boxes or resizing them in the opposite directions. Use the alignment grid to make the boxes snap to horizontal/vertical grid lines.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint