I want to create a custom GTK Assistant with my own buttons to control moving forward and back pages. I also don't want to end the program so the pages will be constantly looped through.
I haven't been able to find anything on line about this, any help would be appreciated.
Or if there another good way to cycle through different pages/windows with buttons then that would also be appreciated.
At that rate, you might be better off with a GtkStack.
Then set your window to popup or undecorated.
Or for a harder way, you could subclass the whole GtkAssistant and create your own implementation.
You can set your GtkAssistantPageType to GTK_ASSISTANT_PAGE_CUSTOM and create page with your own buttons, but you should manage button's signal.
The other solution is the gtk_assistant_add_action_widget function.
Related
this is my first question on Stack Overflow,so I hope you can be friendly if I will make some mistakes.
I'm trying to learn a little bit of Gtk2.0 mechanisms. I'm a newbie with this library so I'm trying to construct a basic GUI.
I created a 230x150 window, attached a GdkPixbuf icon and learned how to trigger signals, in particular I'm interested on showing/hiding the icon on pressing of an arrow key.
I have achieved the objective of showing the icon but I'm not finding the way to hide this one. I looked at the documentation, but anything seems to be working.
I attach the code below so you can help me better. Thanks in advance for hints.
http://pastebin.com/iUJRc6hw
You should be able to hide the icon with gtk_widget_hide(app->icon).
I want to create a vertical menus with focus switching ability.
Do i need to do it using GObject way to create a custom option with its own event signal or should i create it separately without GObject ?
Any suggestion would help. And can anyone give me links for proper example codes where coding is done in production environment instead of fancy examples.
You have clutter tag with your question so I assume you want to use clutter. In that case you could put your menu items as ClutterActor objects into ClutterGroup and handle menu navigation logic on the container level. This is trivial for keyboard events but for mouse navigation you can intercept them on each menu item and then pass it down to the container with item id or something. It is very simple with clutter. Unfortunately, I have no code samples to share at the moment.
I'm using Prism pop-up region and the popup is modaless. When I tried to change Prism sample codes to replace .Show() by .ShowDialog() command, the codes become unstable. So, I need to keep the current codes intact and think of a work-around: change to modaless mode to be modal mode.
I don't know how to do that and/or if that is possible or not. Please share if you know how to. Thank you!
If you are using the Stock Trader Reference Implementation and the RegionPopupBehavior and the DialogActivationBehavior then yes you can. You should only have to change the PrepareContentDialog method of the DialogActivation behavior method from Show() to ShowDialog().
The reference implementation example is not very robust, and I ran into problems creating a more robust popup with the sample code. However, once you tweak the behaviors, you can get it working well.
If you provide more details about your specific problem, I may be able to provide more help.
I'm working on an XmlEditor (similar to XmlNotepad, but using WPF) in which I want to implement personalized menus. I.e. only show the most popular MenuItems on first open, and show all MenuItems when the user explicitly asks for it, either by clicking on the double arrow at the bottom or waiting for a certain amount of time.
I'm specifically looking for feedback on how I should approach this problem: any thoughts are appreciated!
Since you're working on an XmlEditor. It will be a problem for this case. Try using a different editor.
I am currently loading the default file, page.xaml, but in that page, I am loading the content from another xaml file. With each "page" change, I just load the content from a different xaml file, and on and on.
Example: this.Content = new StartPage();
I'm running into some syntax issues, however, because of the way I am changing my content, and was wondering if there is a definitive answer on how to accomplish this?
For example, when trying to capture user's keystrokes, I would normally do:
this.Keydown += new KeyEventHandler(this_KeyDown);
but that event handler doesn't even fire in my situation. So, I'm looking for a new approach to my content-switching approach before revisiting the keystroke problem.
Have you looked at using Silverlight 3. It has a new Page Navigation functionality.Silverlight 3 Navigation
As far as content switching goes, I've always done what you propose in the question. Normally I create a MainPage.xaml which has has the frame of the application (usually a Grid for me). One of the cells in the Grid is considered the content area of the app. When the user takes an action that I would consider to be navigation, I create a new instance of a Page, which for me is a file like MyUserControl.xaml, and then add it to the appropriate content cell in the Grid. MainPage stays around for the life of the application and assists with navigation.
If you want something fancier, and want to take advantage of browser based back/forward buttons, you could look into the SL3 navigation like Correl suggested.
A Big problem with what your're doing is that journalization doesnt take place automatically when you swap out framework elements by creating them and plugging them in the codebehind. This means that you lose the back and forward functionality of the browser. You can manually journalize stuff when you swap out pages, but this is simply a hack to get your navigation approach working.
Take a look at Prism at www.compositewpf.codeplex.com/, specifically the MVVM method of GUI design, it'll save you alot of time later on. And remember, you dont need to go hardcore when you look at MVVM, u could always cut out alot of "dynamic" functionality if you're a one man band
Also swap to silverlight 3 and use the navigation application. If you cant, take a look at helix 0.3, it'll provide a more asp oriented approach to navigation. the link provides a really really good starting point, its a three part article, i suggest you read all three and download the sample application and understand it.
A book could have been written on your question, this has to suffice for now.