Giving any settings to graphobjects
OK, I'd like to give graphobjects any settings throuhg the MainForm, without changing Tsimplegraph too much. I want to write in the Main, for example:
Everything about making nodes unlinkables and unresizables is already written in the simplegraph.pas, but I like you to suggests me how to implement this .DEFAULTNODESETTINGS. Perhaps like a Property? I'm not sure if a Property could have more than a value. Maybe using flags? Controls like SaveDialog have a Property (Options) with a Set of boolean subproperties, but I don't know if I could use integer Subproperties? Any idea?
- Code: Select all
SimpleGraph.DefaultNodeClass := TRectangularNode;
SimpleGraph.CommandMode := cmInsertNode;
SimpleGraph.DEFAULTNODESETTINGS(linkable, resizable, 32,32)
//Where linkable means that I can stablish links at this Node, resizable that the node can be resized, and the number would indicate the size of this node.
Everything about making nodes unlinkables and unresizables is already written in the simplegraph.pas, but I like you to suggests me how to implement this .DEFAULTNODESETTINGS. Perhaps like a Property? I'm not sure if a Property could have more than a value. Maybe using flags? Controls like SaveDialog have a Property (Options) with a Set of boolean subproperties, but I don't know if I could use integer Subproperties? Any idea?