Showing results 1 to 3 of 3

Thread: Extended Trend - Disable dragging / moving of Scale

  1. #1
    Join Date
    26.11.2010
    Posts
    25

    Default Extended Trend - Disable dragging / moving of Scale

    Hi,

    is was not able to find an option to lock the position of Y- and X-scale in a diagram of type extended trend.
    We want to prevent the user from moving the scale of X and Y axis by mouse/touch control. How can this be achieved?

    Thanks.

    BR
    Eric

  2. #2

    Default Re: Extended Trend - Disable dragging / moving of Scale

    A solution can be to disable completly the control at Rutime (naturally by coding):

    Code:
    [AddInExtension("Disable ETM", "Your Project Wizard Extension Description")]
        public class DisableTrend : IProjectWizardExtension
        {
            [DllImport("user32.dll")]
            static extern bool EnableWindow(IntPtr hWnd, bool enable);
    
    
            public void Run(IProject context, IBehavior behavior)
            {
                if(context!=null)
                {
                    try
                    {
                        Scada.AddIn.Contracts.ScreenElement.IScreenElement myElement = context.ScreenCollection["ETM_Screen"].ScreenElementCollection["ETM_Object"];
                        if(myElement!=null)
                        {
                            EnableWindow((IntPtr)myElement.WindowHandle, false);
                        }
                    }
                    catch (Exception ex)
                    {
    
    
                    }
                }
            }
        }
    }

  3. #3
    Join Date
    26.11.2010
    Posts
    25

    Default Re: Extended Trend - Disable dragging / moving of Scale

    That works, but reneders the cursor also locked.

    Thanks anyway.

    BR
    Eric

Similar Threads

  1. [Extended Trend] Zoom in the trend with the mouse ?
    By eegabs in forum zenon Supervisor
    Replies: 1
    Last Post: 3rd April 2018, 09:47
  2. Replies: 3
    Last Post: 21st June 2017, 11:05
  3. trend element scale
    By hash84 in forum zenon Supervisor
    Replies: 1
    Last Post: 17th September 2013, 15:27
  4. Disable grid lines in trend XY
    By galax in forum zenon Supervisor
    Replies: 2
    Last Post: 3rd April 2013, 09:42
  5. Extended trend with opc-variable
    By robcha in forum Drivers
    Replies: 2
    Last Post: 17th October 2012, 09:17

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •