Change default stroke and fill


Author
Message
Ashley Davy
Ashley Davy
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)
Group: Forum Members
Posts: 36, Visits: 119

What is the best way to change the default stroke and fill attributes when a user selects a tool?  For instance when they select a rectangle I want the stroke width to be 3 and the fill color to be purple.  Also is there a way to change this for all tools (assuming all tools have the same attributes) so that they do not have to be indiviually coded?

Thanks,

Ashley


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Ashley,

If you want to change the default appearance of newly created objects, that are created by the different tools (CreateRectangle, CreateEllipse etc.), it is best to override the methods of the NDiagramElementFactory class, an instance of which is associated with each NDrawingView. All create element tools (CreateRectangle, CreateEllipse etc.) invoke these methods when they need to create a new NRectangleShape, NEllipseShape etc. so you can assing arbitrary appearance to these newly created objects.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search