I'm very new to RCP and I want to build a window with a TreeViewer as a menu on the left and views on the right.
When clicking on a TreeItem the current view should be replaced with the new page.
The Views shall not be moveable or closeable.
The menu works fine so far but I can't get the views to act like I want.
I tried using a Placeholder within my perspective:
layout.addStandaloneViewPlaceholder("gui.page:*", IPageLayout.TOP, 0.5f, editorArea, false);
The IDs of the views all start with gui.page...
When I add one of the pages as standaloneView to the perspective it looks just as I want it.
But when I add a View by calling
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(pageID);
in the listener of the TreeViewer, the Pages get tabbed and are move- and closeable.
A good example of what I want to have is the preferences dialog of eclipse. I searched in the eclipse source but I couldn't find the way they made it.
Any suggestions on how to make this?
Views won't get replaced. So you have to hide the previous view by calling IWorkbenchPage.hideView()
Related
I am very new to xcode, got stuck in finding the editor to modify the code when created multiple view controllers. Whenever I click on any of the view controllers, I only see same editor contents and cant move to the others for coding.
I searched the web and stackoverflow but could not find a clear guideline on how to manage the editors for multiple view contollers. I have attached a snapshot.
You don’t “find” code. You create it.
When you drag a view controller into the storyboard, it has the default class of UIViewController. It is up to you to make a new code file where you subclass UIViewController, and then to go back to your storyboard and change the view controller to that subclass in the Identity inspector.
I'm trying to find a tutorial or book, that explain who to make a menu application, like the iPod/iPad menu, with images as buttons, and pages. What i'm trying to do, is a menu, with a Popover window, when an option from the popover is selected, then the menu is filled (with code) with the buttons/images, that can be located in more then a page.
Thanks you in advance
Okay there are two things you can use here:
The Three20 library , which has several extra components you can use as well: repository here
If you want just a view similar to that and nothing else, you can go with myLauncher: repository here
I know there are probably more, but these were the main two I looked at when I went looking for a similar view.
I have 3 views in a window. The first view has content from a tree viewer. The second view has content in FillLayout. Both views get the data from the DB.
Once I click on a link from the second view, I get the new window popping out. But this window looses both first and second views. I don't know what I am missing here.
Any insight is highly appreciated.
I think the window you are opening is showing just the views which are not opened in other windows, thats why you see just a single view. You should search for other ways of opening a new window (as far as I know there are many ways and openWorkbenchWindow is just one of them)
Have a look here for some help, looks quite similar to your problem.
Hi all
I am a newby app developer infact I am still in high school, I am making a radio app and I have made the channel list using interface builder (mainwindow.xib in xcode) now I want to be able to click on a link/button in the main window and that take me too a new page in the app where I can have a play button and maybe a symbol etc. I know it is probably a trivial question but I am stumped, but how do I go about doing this if someone could place it out in step by step or even a few screenshots it really would be apreciated?
Many Thanks in advance
David
So, basically you want to be able to use a UIButton to take you to an entirely new view controller? Well, for your particular case, I'd recommend trying a Tab bar controller. When you create a new application, it gives you an option for what type of template you want, and Tab bar controller is one of them. This creates a black bar across the bottom that lets you cycle between several different independent view controllers. Just create a new tab bar application, and copy/paste your existing code into one of the views, then use the other one(s) to do whatever else you have in mind. Hope this helps!
I inherited the prototypical corporate application with a person form (with address, phone, etc).
Now on that mentioned person form one label+textfield is a child of the form itself and not of the panel it visually belongs to.
How can I change a control's parent from form to an existing panel in VS 2008 designer?
Update:
Ah, it seems to be a problem with the super magic custom group box control my beloved cow orker left for my pleasure. Dragging into a normal group box works ...
Update 2:
With the help of the Document Outline I can see that the custom "GroupBoxExt" we have in the application is defective, dragging a control onto the panel (or just changing position of a control on the panel) assigns it to the form.
Update 3:
Now that I new what was wrong (thanks for the document outline tip) I went of to google and found a custom group box on CodeGuru. The author of that artilce found out you'd need to decorate your custom panel with
[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))]
to make it behave as a nice container.
If you're looking to do this in the designer, what you're looking for is the Document Outline panel (it's under the View menu under "Other Windows"). From there you can drag controls by their name in the outline and reassign the parent.
Hope this helps!
I'm not sure exactly what your asking. Can you try clarifying the scenario a bit?
But if you want to change a controls parent, all you need to do is make that control a child of the panel using the Controls property.
myPanel.Controls.Add(target)
This should update the parent of target to be myPanel.
If you're attempting to do this via the designer, all you need to do is drag the target control onto the panel and that should take care of it.