I've got a multi-band ultragrid with an ultragridrowedittemplate per band.
In Design view the ultragrid is showing several horizontal lines - which can each be dragged downwards to show a view of the ultragrid bands. After much searching I discovered they are row scroll regions and I've added in some code into the form initialisation procedure to remove these row scroll regions.
That was fine at first, but the ultragrid, over time has added more and more row scroll regions to itself - and when the application is now loaded it takes more and more time for the code to run to remove all these regions.
Is there a setting in the Design mode that stops these row scroll regions being added? I haven't noticed a pattern to when they are added. If someone could explain/help this will be much appreciated!
Thank you
In design mode drag the divider to the top of the grid to remove them. To create them there should be a handle just above the scroll bar that you can grab and drag down. If you want to prevent them from being created at design time or run time, set DisplayLayout.MaxRowScrollRegions to 1.
Note that you may also want to set DisplayLayout.MaxColScrollRegions to 1 as well if you don't want either row or col scroll regions. To remove ColScrollRegions, drag the divider to the left of the grid to remove them. There is a handle to the left of the scroll bar if you want to add them back.
Related
So I am making a Gtkmm application using a Gtk::notebook and during run-time I'm adding new tabs to the notebook. But when I add more tabs than there is space on my screen it just keeps going moving out of the screen.
Now I know most Gtk widgets have a lot of properties that can be configured, so I'am wondering is there such a property for notebook that automatically collapses tabs or scales them in some way to make it fit inside the widget/screen.
If not it would be great if you could give me some pointers to how to implement this functionality myself.
set_scrollable() is your best bet. It will add scrolling arrows on the sides of the tab labels at the top when there isn't enough room to show them all.
Note that GtkNotebook will always ask for enough space to show the contents of all tabs, not just the one that's currently visible. If one of your tab pages is really big (say, contains a 10x10 grid of 100x100 buttons), you won't be able to resize the GtkNotebook smaller than that tab page (in that case, 1000x1000 + the height of the label area), even if the current tab page is just an empty container. All set_scrollable() will do is let you resize smaller than the width needed to show all tab labels at the top.
Put this in your .xml GUI file in the GtkNotebook object:
<property name="scrollable">True</property>
This causes the tabs that go out of screen to be horizontal scrollable by adding arrows beside the last tab at the right and the most left tab at the left.
I want to add 4 navigation button in a panel. For Go to First page , previous page, next page, last page [<< < >> >]. I want these buttons in a row but MFC automatically put them in a column. Is there a work around to achieve this.
Thanks
Did you associate these buttons with large (32x32) images? Otherwise, the MFC Ribbon is always trying to put them into the column. In addition, you've to call SetAlwaysLargeImage method for each button to prevent button size decreasing when the frame is being resized.
Regards,
Rob
I have a grid with a ListFilter on one of the columns. The list of filter items is long enough that it overflows the height the pages. However I do not get scroll handles on the list like I do with the column menu.
To illustrate this:
Column menu comes standard with top and bottom scroll handles on overflow, top handle shown here:
The ListFilter menu has no scroll handle on overflow (though it will scroll with mouse wheel):
Initially, I thought this was happening because my ListFilter implementation was based off a remote data store rather than a fixed list of options (the data isn't loaded before the grid renders). I changed to a fixed list and I still dont have any handles. Has anyone implemented scroll handles on these filter lists?
Add this.self.xtype='menu'; to the constructor function inside ListMenu.js and it should work.
How to enable horizontal scrollbar smooth scrolling for CGridCtrl. Now it jumps by fields when I scroll it from left to right.
I assume you're talking about CGridCtrl published in this CodeProject article.
If so, then you're going to have to completely override the drawing methods to offset the columns by the current scroll position (instead of calculating the first column to display from the scroll position).
To get you started, you should begin by looking at GetScrollPos(SB_HORZ) to use as an offset to begin drawing.
I want to have CListCtrl.EditLabel() for any column of the list. How can I implement such a feature?
This is doable but it does require a fair bit of stuffing around with mouse clicks and focus events.
In a nutshell you trap the left mouse button down message and convert it into a cell hit details (i.e a row and column index).
With these cell details you can not determine the size and location of the list view cell and also the text value that it contains.
Now create a CEdit control directly over this cell by using size and location details from the previous step and give it the text value of the cell.
The final step is to handle the focus and keyboard enter events for the CEdit so that the text details of the CEdit can be put back into the list view cell.
It does take a fair amount of coding but when done right it does work well as an alternative to a grid control.
Don't attempt with CListCtrl.
Use the MFC Grid Control. We deploy it in an off-the-shelf app with success. It offers in-place edit, checkbox, spin, etc for all cells, as well as column and row headers, auto-size, auto-expand, colors, drag-drop.