[Description("Width for High line Post touch.")]
[Category("Plots")]
[Gui.Design.DisplayNameAttribute("Line Width High Post touch")]
public int highLineWidthPostTouch
{
get { return HighLineWidthPostTouch; }
set { HighLineWidthPostTouch = Math.Max(1, value); }
}
As you are probably aware there is a limit of 10 for the width otherwise a run time exception error is raised when calling DrawLine when the width parameter exceeds 10.
In the Initialise() body i inserted a check
if (HighLineWidthPostTouch > 10) HighLineWidthPostTouch = 10;
What i need is for the value to be between 1 and 10. I was trying to see if there was a way in the parameter section to define a max and min value but in looking around couldnt see a way to do this even with linking parameters one with Min one with Max?
So i elected to do the check in the initialise ; the issue appears to be that the setting in initialise doesnt seem to work ; i have 6 width parameters and each is used in a separate DrawLine call ; so when the first DrawLine call is made depending on the flow of logic it is raising this error and each has a different width.
Is there something obvious i need to so in the parameters ie to make it editable ie the initialise code is not taking effect or i need to set the value for the lowercase name
highLineWidthPostTouch ie the name of the parameter?
Incidentally is this a Ninja 7 limitation of DrawLine width or is the underlying graphics? I could see no mention of this in the documentation anywhere and happened to stumble on this as it was affecting the logic flow as an exception was being raised,
Any input appreciated
thanks
Comment