Hey, that did it! Thank you so much, Christian - you are the best! Just a note to anyone interested, this technique allows drawing over the window resize box in the right corner of a resizable window, that is impossible to draw over otherwise in RB, as far as I know.
Thanks again! : ) Aaron ===== On May 24, 2011, at 6:00 AM, [email protected] wrote: > Am 23.05.2011 um 06:27 schrieb Aaron Andrew Hunt: > >> I'm trying to add a little round lower-right corner image to a WebViewMBS >> that's returned in a CocoaControlMBS. I have the image as a picture, p, my >> WebViewMBS is v, and then I do this: > > this does work for me: > > Function GetView() As NSViewMBS > n=new WebViewMBS(0,0,me.Width,me.Height) > n.LoadURL "http://www.apple.com" > > dim logo as Picture = LogoMBS(50) > dim nsi as new NSImageMBS(logo) > dim nsv as new NSImageViewMBS(0,0,50,50) > nsv.image = nsi > n.addSubview nsv > > Return n > End Function > > so we create the image view with the size you need. Instead of 0,0 you should > use the position you need where 0 for y is the bottom of the window as cocoa > has a bottom up coordinate system. > >> ... and it doesn't work, first because nsv has to be an NSViewMBS; it can't >> be a NSImageViewMBS. > > Well, NSImageViewMBS is a subclass for NSViewMBS, so this should be okay. You > forgot to define the size here. > >> Obviously, I don't understand how to do it. I also want the corner to move >> as the WebView is resized. Can anyone help? > > for the bottom right, you can do this: > > dim nsv as new NSImageViewMBS(width-50,0,50,50) > nsv.autoresizingMask = nsv.NSViewMinXMargin > > The autoresizing mask will make sure the control stays on the right side. > > Greetings > Christian _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
