Can I animate the HorizontalFieldManager in Blackberry?
I have a button in the bottom bar of the screen, and there is an array of images which display in a horizontal layout above the button.
When I click on the button, there should be a slide-in slide-out effect and the images appear one after the other.
Can anyone suggest me any tutorial or link for this?
I think the working approach will be in implementing your own custom bitmap field and placing it above the button, you want to press. When button is pressed, then intercept this event and update contents of your custom bitmap field.
Here is an example, how to create a custom field with RIM SDK.
Related
I have an oversized picture that I want to add to a powerpoint slide. I want the picture to fit within a box and have a vertical scroll bar.
This is probably not the answer you are looking for but you can make a faux scrolling bar with shapes and action buttons. The explanation for this is described in the Office page: http://office.microsoft.com/en-us/powerpoint-help/create-a-scrolling-effect-in-powerpoint-2007-HA010245145.aspx
This will allow you to get the feeling of a scrollbar. You can also add separate sections of the picture which becomes visible/invisible when you click the action button instead of showing the next page. You can alter the action by right-clicking the action button and changing the action or you could use a regular button with the shape of an action button with an added hyperlink.
I have created a custom (themed) NSWindow, by creating a borderless window and then recreating all elements of the window border/background inside the content view. I've created the window widgets (close box, zoom box, minimize box) on top of my own fake title bar using -standardWindowButton:forStyleMask:.
Trouble is, when a sheet is presented on top of my custom window (e.g. "save changes...", those buttons do not receive the clicks.
Does anybody know how I can tell NSWindow not to intercept the clicks in my minimize box? It works with a standard NSWindow. When a sheet is up, I can still send both of them to the dock, or zoom the window out.
I thought maybe there's special code in the content view that ignores clicks in subviews while a sheet is up. But it seems as if -hitTest: is called on the content view and returns the minimize widget, but the widget's action never gets triggered.
I guess I could just replace the content view and perform the action in the content view's hitTest if it is the minimize widget ... but that seems a bit ugly.
I'm trying to make my first Cocoa app (previously I was making iOS apps) and what I wish to do for my custom view is make it's title clickable with indicator (accessory) triangle facing down.
Clicking the title would open a popup/menu with my items.
How is that doneable in Cocoa?
Rdelmar's answer is probably the easiest way to go, but may not do exactly what you might want to do (which is replace the actual title with a pop up item, instead of having a popup button under the title in the toolbar area). With respect to functionality your application will probably work just as well using the toolbar.
If, however, you truly want to replace the actual title, the means of going about this would be to set the NSWindow title text to #"" to hide it, and redraw it by sticking in your own view.
[[[theWindow contentView] superview] addSubview:theSubview];
This basically tells the superview of the main content view to add another subview (direct "translation" from the code), and you'll have to tinker with the frame of this new subview to have it be positioned where the title should be positioned (as now it's free to be placed anywhere in the window frame, including on top of the title bar, as opposed to simply inside the content view).
theSubview can be your popup button, or whatever you want, and you'll also probably have to custom draw the popup button to match the original drawing of the window title.
You can do this by adding a toolbar to your window in IB. Once, you add the toolbar, you can double click on it to open the customizer view of it. Drag a popup button into the Allowable Toolbar Items area and after it is inserted there you can drag it into the bottom area which shows the layout of the toolbar -- you can also drag out any of the default items there that you don't want.
Can I just want to replace the appearance by setting a property of NSButton?
I am able to change the appearance by using the "image" property of the button but I got an ugly gray rectangle whenever the custom button is clicked (the image has a transparency). Is there a way to hide that rectangle?
Thanks.
The following call changes the behavior by making image be darkened when clicked:
[[button cell] setHighlightsBy:NSContentsCellMask];
I want to show image when button is pressed on main screen in blackberry, How can I do this?
Simply I have a button, when I do press it, the data is loading from xml, and I want to show that data is loading, how can I do this, I have image(having text on it).
Help!
You can add that image in a vertical field manageer and add the vertical field manager to the screen on the button click. that's it..