How to get GoBalloon not subject rescale event?

HI

I am trying to know is there a way to keep the GoBalloon window not rescale when the whole GoView is rescaling so that the internal control won’t have to resize at all.

Thanks

GoBalloon is just another GoObject, so it scales with all the rest when you change zoom levels.

So there is absoutly no way to prevent ballon from zooming event?

If I have to write a control to act like Balloon window without affected by the zooming, does that mean that control can’t inherited from GoControl as well?

Thanks

Implement a GoView.PropertyChanged event handler, looking for changes to the “DocScale” property, that changes the size of the balloon so that its effective size (after zooming) remains a fixed number of pixels.

Just try that approach, as I watch in the GoView’s propertyChanged event handler, the size of the balloon actually does not change when the DocScale property is changed.

Can you elaborate your idea a little bit more?

Thanks

Right… the size doesn’t change as the scale does. So, the goal is to actually change the size as scale changes so that the number of pixels on the screen doesn’t change.

(if you use your corporate email address in your profile, it’s a lot easier for me to figure out that you’re under support.)

something like this. See the NOTE down in the spot where the original size is recorded.

    private void goView1_PropertyChanged(object sender, PropertyChangedEventArgs e) {
      if (e.PropertyName == "DocScale") {

        foreach (GoObject o in this.goView1.Document) {
          ResizableBalloon b = o as ResizableBalloon;
          if (b != null) {
            SizeF basesize = b.Basesize;
            float scale = (1f / goView1.DocScale);
            b.Label.Size = new SizeF(basesize.Width * scale, basesize.Height * scale);
          }
        }
      }

    }
   [Serializable]
  public class ResizableBalloon : GoBalloon {

    public ResizableBalloon() {
      this.Resizable = true;
      GoText lab = this.Label;
      if (lab != null) {
        lab.AutoRescales = true;
      }
    }

    public override string Text {
      get {
        return base.Text;
      }
      set {
        base.Text = value;
        basesize = Label.Size;   //** NOTE: this assumes Text is set at DocScale=1.0... 
      }
    }

    public SizeF Basesize {
      get { return basesize; }
    }

    SizeF basesize;

 }

Excellent ! That’s what I need.

Thank you for prompt answer.