Ticket B133489
Visible to All Users

Provide a way to interact with a linear horizontal gauge

created 16 years ago

I've a problem with interaction and a linear horizontal gauge.
The problem is relatet to the percent calculation from the mouse position.
I attach you a sample that demostrate this issue.
I get the code to calculate percent from gauge samples.
I found that the calculation change when the dimension width height of the control change.
This lines of code have the problem:
BasePrimitiveHitInfo hi = container.CalcHitInfo(e.Location);
            if (hi.Element != null)
            {
                PointF modelPt = MathHelper.PointToModelPoint(scale as IElement<IRenderableElement>, new PointF(e.X, e.Y));
                float percent = scale.PointToPercent(modelPt);
                scale.Value = scale.PercentToValue(percent);
            }
Thank you!

Show previous comments (1)
GM GM
Giuliano Marullo 16 years ago

    What's ?
    The LinearGaugeControl support Horizontal and Vertical orientation, then is too much to ask you that it works well either vertically and horizontally ?
    I do not undestand what is your solution ??

    DevExpress Support Team 16 years ago

      Hello,
      Our MathHelper class doesn't allow you to accomplish this task. We are ready to create another helper for you that works with the horizontal orientation. I've converted this bug to the suggestion. We'll post our solution in this thread.
      Thank you, Marina

      DevExpress Support Team 16 years ago

        Hi,
        We have implemented this feature. In the 8.3.5 version, you will be able to use the MathHelper class for the linear horizontal gauge.
        Thank you, Marina

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.