Sorry that my title is not clear enough. What I wanted to ask is based on a screen capture:
I want to make an app like this. But there are two elements I do not know what the classes are: A and B (C and D are NSSplitView. I just knew).
Could any one just tell me what ducuments to follow to create UIs like the appearance of A and B? Thank you!
Create A UI in NSOutlineView is the way to display hierarchical data that can be expanded and collapsed, such as directories and files in a file system.
B is made by Gradient buttons set images to gradient buttons to get B UI
or
Use NSToolBar to use formal ui design.
Related
Having troubles here finding the right containers to represent a list of tasks on the screen.
Basically, I am looking for Gtk containers in order to be able to:
a) create list of tasks as in "Tasque" (this is definitely possible, since Tasque is a Gtk app).
b) create a "delete/edit" option that appears left to the task when the mouse pointer is hovered over (akin to Basecamp). (This might not be possible, since it's done via HTML in Basecamp).
Your help is much appreciated!
For the lists of tasks I would use a Gtk.Treeview. As for the edit/delete links on mouseover--it would be pretty tricky to do it the way you show unless your GTK application actually generates and displays lists as HTML content. I think you are best off using the Gtk.Treeview and either (a) have the delete/edit icons at the top of the list in a Gtk.Toolbar or (b) add delete/edit link buttons to the tree view iteself.
Personally, I wouldn't touch the styling of the treeview as that is probably best left up to the user's theme, but, if you had to you can use your own Gtk.CssProvider to style the tree view any way you want.
On the IPhone, the map control allows you to switch between a list mode and map mode easily. I've been trying to find examples of this for WP7 but am at a loss.
Is there a best practice for implementing a list of objects on a map?
If not, do we just do it manually, I.E. Save the dataset and display it as a listbox or something?
If you do it manually, where is the best place to put a button to switch you between the 2 screen styles? I feel like that app bar isn't right.
I don't want to copy the IPhone UI standard and have a button in the title bar, although I'm running out of options.
For one "best practice" I'd take a look at how the default Bing Maps app works - it provides a "results list" text menu item accessible from the ApplicationBar - and this is displayed via a full screen dialog (at least I think that's what it is).
However, that is only one "best practice" - I don't think their UI is perfect for all apps.
Application bar is fine, just make sure the buttons are in the same positions for each bar and that toggling views 10 times does not require pressing Back 10 times to go to the previous page, maybe use a different page transition so it doesn't feel like every other transition on the app.
I'm in the process of teaching myself basic cocoa application development and so I'm stepping up to the classic "calculator" project.
What I was wondering is this: to create the actual calculator interface would it be best to just add 4 rows of 4 NSButton controls and edit them to have the label/functionality I want or is there a more efficient way to create the layout?
I know this is a basic application but following OS X rules I want my code to be as efficient as possible so I want to make sure I'm doing it right.
Thanks for any help guys.
There's really nothing wrong with creating 4x4 buttons and you'll have the most flexibility with this approach. The most efficient way though would be to use an NSMatrix. To create a matrix of buttons in Interface Builder, create one button (your prototype), then select Layout->Embed Objects in->Matrix from the menu. When you now select the matrix, you can specify 4 rows and 4 columns in the Attributes tab of the inspector window.
I'm trying to create a very simple selection list widget based on NSOutlineView. However, I'm having a hard time figuring out how to display an icon and a label right next to it, which is really the expected behavior in all the mainstream implementations of that kind of widget out there (iTunes, mail, Finder,...).
So far I am just binding two separate cells, but then when I'm expanding the tree, the icon cell grows larger and a gap appears between the icon and its accompanying label. I know I can probably overcome this problem by extending NSCell and provide a custom class, but as what I'm trying to achieve is really the standard thing, I can't be resigned to accept that there isn't a simpler solution.
Candide
Sadly, there isn't a 'text and icon' cell that you can just use, fresh out of the box as you would like. However, when I was working on a project, I found that Apple released some sample code that implements this, since it is such a common idiom.
This can be found here, specifically ImageAndTextCell.h/m
It can help teach you about UI customization by reading through this example, but scratching that, just dropping the ImageAndTextCell straight into your project should do just fine.
You need to create ImageAndTextcell to combine text and icon..
you can create ImageAndTextcell like this Sample Project
Does this control have a name? Or is it just a bunch of simple controls merged together? If so, what controls are they?
http://img8.imageshack.us/img8/3002/picture2xrb.png
It looks like an NSTableView with an a custom cell type and no column header. Have a look at the documentation for NSTableView's tableView:dataCellForTableColumn:row:. For columns which have the same type for all rows you may also set the cell class in interface builder.
I doubt the search box is part of the same control.
You could open the Application's Nib file to see what is in there. Look inside the application bundle. If the application is called Example then you should be able to find the Nib at Example.app/Contents/Resources/English.lproj/MainMenu.nib.
The best tool for investigating this is fscript, specifically FScriptAnywhere which will let you determine the class and much other information about any visual element of any Cocoa program (and do a lot of other interesting things with Cocoa programs).
In addition to what toholio said, an easy way to get the look and feel of the bottom button bar is with BWToolkit.