I'm trying to figure out how to use an image as my window frame. I've been looking at creating custom windows, but it talks about drawing a custom shape rather than using an existing image.
I want to make a window like this:
Checkout the TunesWindow example by Matt Gemmell:
http://mattgemmell.com/files/source/tuneswindow.tgz
It uses separate images for the borders, corners and center.
Also checkout MAAttachedWindow by Matt Gemmel:
http://mattgemmell.com/files/source/maattachedwindow.zip
Panel similar to the one shown in your question.
Related
I am attempting my first Cocoa Application after developing for iOS for the past few years. I have been "googling" around for awhile now but I guess I am not using the correct terminology to find what I am looking for.
In many applications OSX applications I see this little dot (or sometimes no dot at all like in XCode) which allows you to grab "an invisble" line? Which will resize two or three windows at a time while they are all bound together. How is this done? I'd like to implement it in my current app I am building. I have attached an image to clarify what I am talking about.
Thanks in advance
These are not windows. These are subviews of an NSSplitView
It's an NSSplitView. The line is the divider and can have 3 different styles:
NSSplitViewDividerStyleThick = 1,
NSSplitViewDividerStyleThin = 2,
NSSplitViewDividerStylePaneSplitter = 3,
(the style in the images of your question are the Pane Splitter style).
The content views can be easily added using Interface Builder, or programmatically using the [NSView addSubview:] method (NSSplitView derives from NSView).
You will want to control the splitter behaviour via its delegate (NSSplitViewDelegate).
Also note that the image in your question appears to show a split view within another split view, which is a fairly common way of laying out views.
I am currently writing a program that requires a picture box with a transparent image to go over several pictureboxes. I have looked for hours now and found nothing useful. the program is a rubiks cube solver. each square is represented as a picturebox and the cube is shown in a net form. I cant upload images as my account is new but i have included an image of a rubiks cube in a net form. now imagine a semi transparent image going over some of the squares (pictureboxes) to represent a visual guide to the rotation about to be made in the solve process. If you need more info I will do my best and upload images and add code for better clarification if needed. If this is not possible is there any alternatives that I could attempt? Thankyou
I don't think what you want is possible. I was actually trying to solve the same problem about 2 days ago and to no avail. You can't have transparency to work with multiple pictureboxes on winforms. What you need to do is draw the images using Graphics like one over the other. Use 1 picturebox and do Graphics to overlay the picture on the picturebox. Or have the main picture as the form's background image and use pictureboxes, this was what I did. This is surely easier using WPF. Alternatively... Try to check this imaging SDK.
http://www.gdpicture.com/
This might help overlaying your images.
And this too, this is basically the one using 1 picturebox and overlaying using Graphics.
VB.NET Winforms: Overlay two transparent images
Is there a simple way to get shape recognition working with WinRT?
With WPF it was simple I could just use InkAnalysis but it seems that it is not available in WinRT(?).
I want to be able to draw basic shapes circle, rectangle and square and I want to be able to recognize them.
Any suggestions?
The GestureRecognizer class that you get out of the box only supports the simple gestures used in various standard Windows 8 controls. For your scenario you could try the 1$/n$ recognizers I linked to in this previous question.
I have implemented crop functionality but
Is it possible to selection crop image like below link
http://deepliquid.com/projects/Jcrop/demos.php?demo=advanced
Short answer, not really unless you do some clever coding and view aligning / transforming.
Long answer, you have two options:
Create your own custom module with XCode, OBJ-C etc.
Just nest the Jcrop code in your own webview inside titanium. (This seems easiest).
Notice this app:
How can I draw that sort of triangle above an existing NSWindow? I know the app in question probably draws the whole thing as a custom window, but I want to keep the existing title bar. Is there any way to draw a triangle and attach it above a NSWindow? Please note that the solution has to be MAS-compatible (i.e. no private frameworks or classes).
The only way to do this would be to create a borderless child window with no shadow that overlays the edge of the existing window. You'd need to draw any shadow yourself.
A more comprehensive solution would involve subclassing NSThemeFrame and doing some custom drawing. Take a look at Matt Gallagher's Drawing a custom window on Mac OS X. It contains a wealth of helpful information, and Google will also be of great help here.
I've written an open source (BSD) framework that draws windows similar to this: https://github.com/sbooth/SFBPopovers
It won't directly do what you need but will illustrate the basics of drawing custom window frames.