开发者

how to place some label on some window?

开发者 https://www.devze.com 2023-02-05 23:22 出处:网络
I need to mark some opened win开发者_如何转开发dow from my application. I can get the windows list, their system id, name, owner... Can I draw some NSImage only on choosen window?If you have a window,

I need to mark some opened win开发者_如何转开发dow from my application. I can get the windows list, their system id, name, owner... Can I draw some NSImage only on choosen window?


If you have a window, as you say you do, you could add a NSImageView as a subview of that window. This NSImageView should be set to have a frame the same size as the window in question so it fills the window.

If you need to do custom drawing you could subclass the NSImageView and override its drawRect: method or you could just set its image property to an image that you have already created and added to the apps bundle.

Hope this is what you mean.

0

精彩评论

暂无评论...
验证码 换一张
取 消