Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Snap Mode

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Snap Mode

    Hello

    I am creating two custom DrawingTools and I have a problem with the snap mode.

    I am setting the Snap mode in OnRender method like this :

    ChartControlProperties myProperty = chartControl.Properties;
    myProperty.SnapMode = SnapMode.Bar;

    One DrawingTools needs to use Snap Mode Bar and the other Snap Mode Bar And Price.

    When I apply them one after the other the second drawing tool first Anchor point is always wrong ( the others being fine ).

    For example if I apply the DrawingTools SnapMode.Bar first
    when I apply the DrawingTools SnapMode.BarAndPrice the first anchor point will set the point as SnapMode Bar !

    I tried to set myProperty in MouseDown and OnRender without any success.

    Is there a way to set myProperty elsewhere so that the SnapMode will work properly for all anchor points.


    Thank you






    #2
    Hello blar58, thanks for writing in.

    The help guide page on ChartControl includes a warning about setting the properties through a script:


    Warning: These are UI properties that are designed to be set by a user. Attempting to modify these values through a custom script is NOT guaranteed to take effect.
    There's no guarantee that setting the SnapMode property will be set through the calling NinjaScript object, we recommend only setting these properties through the user interface.

    Please let me know if I can provide any further information.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X