Profile Picture

change shape fill style

Posted By Filip Mergental 11 Years Ago
Author
Message
Filip Mergental
questionmark Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 16, Visits: 1
I want change shape.Style.FillStyle after click on a toolbar in my application.
I will change shape.Style.FillStyle in some function and:

* when the window with the nDrawingView is maximized, the shape.Style.FillStyle is changed correctly

* but when the window is not maximized the shape.Style.FillStyle is changed only after the mouse cursor is in the window with nDrawingView.

Where is the problem?

Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi,

The problem is that you do not refresh the drawing view after you change the fill style of the shape. You should call the SmartRefreshAllViews method of the drawing document in order to do so:

NStyle.SetFillStyle(shape, new NColorFillStyle(KnownArgbColorValue.Red));

document.SmartRefreshAllViews();



Best Regards,
Nevron Support Team



Filip Mergental
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 16, Visits: 1
It works, thank you very much.

Originally, I used: shape.Style.FillStyle = new NColorFillStyle(fillColor); nDrawingView.SmartRefresh();
and it had the problem described above.




Similar Topics


Reading This Topic