Hide DockableControlPanes in DockAreaPane - infragistics

I'm working with Infragistics controls. I have an UserControl that is put into a DockableControlPane, that is then put into a DockAreaPane that is inside of an UltraDockManager, that is inside a Form.
Example udockManager.DockAreas has 5 DockAreaPane(dap1,dap2,dap3,dap4,dap5) and dap1 has 3 DockableControlPanes in its Panes (P1, P2, P3).
I want to hide P2 based on some condition.

If you need to hide it at all, e.g. not visible by the user, call Close method over the pane like this:
P2.Close();
If at latter moment you need to show it again call Show method like this:
P2.Show();

Related

wxWidgets - Switch between different view on button click

I am making a music application, I have it show like a mini-view of the app as the default view, and I want it to switch to a big view on a button click. The default/mini view has a panel -> sizer -> sub-sizer -> widgets. And for the big view, I have a separate sizer and panel.
The default view looks like this
And when I press the L button on bottom right, I want it to switch to big view which is supposed to look like this
The top panel is empty here, I have not added widgets to it yet. I can provide additional information if required, like code snippets and all. But I want everything to be on the same wxFrame. I have defined all widgets in the constructor, but it overrides the previous panel and sizer. Also I want to be able to switch back and forth between the 2 layouts.
For completely replacing the frame contents like this you may find wxSimplebook useful as you can then just call its ChangeSelection() method to switch pages. You will need to adjust the frame size, e.g. by calling frame->SetClientSize(book->GetBestSize()), after switching pages manually however.

What is the ember way to add popovers to views?

I'm working on a events board app. Events are displayed in columns at the height matching the start time and pack into the space if there is more then one overlapping. Each event is a view and I want to have a div next to the view that shows and hides on hover.
I know how to bind to mouseEnter and mouseLeave to show and hide part of the template but I want to show something adjacent to my view/template not within it.
I've already got some computed properties on the view to place the event with the correct height and width so I don't want to add the popover inside the view.
Here is something to mess with http://jsbin.com/osoner/1/edit
Seems like something simple but I want to make sure I'm doing things the Ember way.
After messing a little with your provided jsbin, here the results.
Basically what I've done was adding a new popup css declaration wich do position the popup so that it appears outside the parent view, and also moved the {{#if...}} helper into the originating view.
If you want to go more fancy, checkout this jsfiddle wich uses the twitter boostrap popover.
Hope it helps.

Qt - Display several, selectable lines

Im writing a tool that simulates Turing machines.
Here, Ive got a transition table of a such a machine
When a cell is double-clicked, a little dialog pops up (which is a custom widget, derived from QFrame) and should allow editing the contens of a cell. A cell may contain several rules (those |q2, 3, R| and such) and I want that little dialog to show these. The thing is that a user should be able to add and remove rules. At first, I wanted to use QLabels for that, which is fine with the adding aspect, but how do I remove existing rules? I planned having the user select the rules and click "Remove" but do I make sure the entire rule (QLabel) is selected?
Or should I take a completely ddifferennt approach to removing? Like letting every label have an own checkbox?
I would like to keep it as simple as possible. For example, QTableWidget is too "fat" for this, I feel like
You should use a QListWidget - this will allow multiple lines, multiple selection, without the cells or horizontal/vertical headers.
http://qt-project.org/doc/qt-4.8/qlistwidget.html

create a scrollbar in a submenu qt?

I have a map application and a submenu which has dynamically added objects (i.e. points on a map) added to the submenu, depending on the layer that is loaded. I have the ability to hide each individual objects (i.e. a point) by clicking on the corresponding submenu item. Is there any way to organize the submenu? When there are a lot of points (i.e. 100) the entire submenu takes up the screen. Can I add a scrollbar to a submenu? I looked in the documentation, but couldn't find anything that support this feature.
From this bug report I was able to find out that you could do the following:
submenu->setStyleSheet("QMenu { menu-scrollable: 1; }");
Works like a charm.
There is no such possibility as far as I know.
Maybe you shouldn't use a sub menu for this but prefer a menu entry that show a Point manager GUI of your own which would have a QListWidget displaying all your points items.
I'm aware that this solution will break a (big?) part of your code but I don't see anything else.
I think you may be able to get the effect you want by creating and using your own QStyle subclass (via QApplication::setStyle()), and overriding the styleHint virtual method to return 1 when the StyleHint parameter passed in is SH_Menu_Scrollable. At least, that works for me when I create large QMenu objects and show them as popup menus.... It may also work for QMenus attached to the menu bar, but I havent tried that.
Whilst it is possible by subclassing the QMenu class to create a custom widget and going from there you're better off looking at a better way to display that information. You'll save yourself time and it'll be much easier for your users to not have to scroll through a big list of items in a small area.

Does MFC have a built in grid control?

First what I want: The ability to display a grid with multiple columns, each cell having a custom render callback. So you might use such a control to display your inventory in a game, or something like the behaviour in Google Chrome where it shows a grid of popular pages you visit.
I've been playing with CListCtrl and while I can get custom rendering ability on each item, I can't get it work with columns - having say 3 items per row. The control has column-related methods but I think these are specifically for the built-in functionality where different attributes of an item are shown automatically in each column... not for providing a generic grid control.
So, does such functionality exist in MFC? If not then I wonder if the easiest approach is for me to actually insert each of the rows as an Item... and then the custom rendering draws the multiple cells in the row, I could also do custom UI to support clicking on the cells.
But what I really want is to be able to create a custom control, and add this as an item to a list - like in Flex for instance - so I/O etc is automatically handled.
Any advice/information welcome...
Dundas has thrown some of its (excellent) components in the public domain. Their Ultimate Grid is available on CodeProject.
I'm not aware of a built-in control, but I think you should take a look at this.
The article is describing in detail the functionality of a fully featured MFC grid control, derived from CWnd, for displaying tabular data.
YOUR_LIST_CONTROL.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_INFOTIP|LVS_EX_GRIDLINES);
I think it will help you (SetExtendedStyle).
I suggest this one:
https://code.google.com/p/cgridlistctrlex/
very complete