How to make an interactive button in mayavi - mayavi

One of the mayavi examples shows how to make an interactive slider for a 3d display
http://docs.enthought.com/mayavi/mayavi/auto/example_superquad_with_gui.html.
Is there a similar way to make a button? (e.g. something the user can click on to change the picture shown.)

Related

How to achieve the layering effect of one Composable on top of another when showing a dialog using Jetpack Compose

I'm hoping to understand how I can achieve this behavior using Jetpack Compose in Android when displaying a dialog on top of the current Composable view.
Desired State:
Animation when clicking on the Filter button at the bottom. This is from the app Culture Trip on iOS.
I currently have a dialog like below. If you notice, my content is still visible but I would like to have it appear as if it's a page layer that's in the background.
Notice the red arrow in the desired state picture. I can mimic that behavior by having a row and setting the background color with padding but looking for a more elegant solution or wondering if there is standard behavior that I don't know about.
Actual State:
For displaying your dialog above, you need to use Box and call dialog at the very bottom of this Box.

I want to Click , Drag and Move a button on the pygtk window

I managed to find a sample code for Images as described in the following link .
How to drag images with pygtk
However when I use it for a button doesn't seem to work .
What the original link does:
It moves (pans) the image inside a 'Scrolled Window' widget. The widget doesn't change places, only the image with respect to the widget.
If you want to move the button itself, that is more complicated! It is easier if you use the 'fixed' layout manager, where the buttons are located in absolute coordinates (as opposed to the 'normal' layout manager where all widgets are 'packed' alongside each other. There you should use drag and drop. You have to prepare the entire application for 'receiving' the button, and what to do with it when it gets there. This involves many steps! ).
Have a look at the gtk.Fixed widget's documentation.

how to align text center in nsMenuItem Cocoa Mac osx

I am new in MAC OS X development, I have to align text centre in nsMenuItem but I not find any particular solution. I checked on google but not find any tutorial.
Find some tutorial but not exactly same, in these tutorial we take a NSView in nsMenuItem and then Insert subview in NSVIEW to accomplish it centre align.
Is there is any better solution? Please provide me link if possible.
Edit : I attached screen shot, but this is not working for me.
Thanks
You can set the Attributed String of the menu item, which does allow you to center the text, as well as change the font, color and size of the text as well.
I do not know which version of Xcode/OSX you are using, but under Xcode 5.0.2 you can use the built-in interface builder to edit the attributed strings of menu items.
Click the MainMenu.xib entry, then click the menu you want to edit to open it, then click the menu entry. On the right side of the window there should be some options, if not click the right most square in the group of 3 at the top right of the Xcode window 1.
Once you have the right panel open click the Attributes Inspector icon [2] (4th from the left, looks like a slider type icon). At the bottom of the list of attributes you will see an entry for "Attrib. Title" [3].
That is where you can set a custom font, color and alignment for your menu item.
If you need more control then that provides, you can also embed custom NSViews into your menus which gives you complete control over how the menu will look.

Edge Animate CC dynamic / animated slider

I want to make a dynamic animated slider with symbols that contain clickable actions vs a slider image only approach. I would like to use a "next" button and a "back" button that will scroll multiple background images that contain clickable links. I can produce a basic image slider with the back and next buttons, but this approach is limited. Any help on how I can do this in Edge Animate CC will be very appreciated.
I was looking for a very simple slideshow a while ago. Came up with this here:
http://jquery.malsup.com/cycle/
If you want your Slides to contain any clickable items you will be able to simply add them to the sides div. Just set the picture as a background image in CSS and you are free to develop any clickable items infront.
Here is another tutorial that worked fine for me: http://line25.com/tutorials/build-a-simple-image-slideshow-with-jquery-cycle
To me this is easy to understand and if you are used to jQuery at least a little bit this here will work out fine for you.

Color Menu Chooser

How can I make a color chooser for text to use in my cocoa app? I am trying to get the same color selection menu like used on microsoft word. Would this be a popup button or color well or what?
Thanks!
I would personally recommend that you don't emulate Microsoft's UI. It looks very un-Mac-like and you can do better.
You could implement something like this as a popup button and in the button's menu, use custom views for the various color picker sections. Apple's MenuItemView example code shows how to use custom views in menu items.
That's not a standard Cocoa control, so you'll have to come up with your own implementation if you want your picker to look just like that. You'd probably be better off using the standard Cocoa controls for colors, though -- they're used in many programs, so users will already be familiar with them. There's NSColorWell, which displays a single color, and NSColorPicker, which provides a user interface for selecting a color. Read about both in Color Programming Topics.