Hi,

Using a NSProgressIndicatorMBS as a progressbar located in the title bar 
of a window, I would like to resize it in the Resizing event of the window.

Here is the code in the Open event of the window :

   v = new MyNSProgressBarMBS(Self.Width/2+100, Self.Height, 140, 
NSProgressIndicatorMBS.NSProgressIndicatorPreferredThickness)
   v.autoresizingMask = v.NSViewMinXMargin + v.NSViewMinYMargin // top right
   v.isIndeterminate=False
   v.DoubleValue=50

   w = new NSWindowMBS(self)

   w.contentView.superview.addSubview v
   w.show

Given that v is a global of type NSProgressIndicatorMBS and w a global 
of type NSWindowMBS.

I'm trying this code in the Resizing event of my window:

   v = new MyNSProgressBarMBS(Self.Width/2+100, Self.Height, 
w.Width-10-(w.Width/2+100), 
NSProgressIndicatorMBS.NSProgressIndicatorPreferredThickness)
   v.autoresizingMask = v.NSViewMinXMargin + v.NSViewMinYMargin // top right
   v.isIndeterminate=False
   v.DoubleValue=50

   w = new NSWindowMBS(self)

   w.contentView.superview.addSubview v
   w.show

It seems to work when enlarging the window, but not when reducing the 
width. In addition, I'm wondering if I'm not creating each time a new 
NSProgressIndicatorMBS object.

Could anyone help me solving the issue?

TIA

-- 
Jean-Luc Arnaud

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to