|
Subject |
Author |
Date |
|
|
chen xinyu
|
Sep 19, 2009 - 11:10 PM
|
I want to use a group of radio buttons in RibbonBar, but the question is that I do not know how to get the message after user changed the selection. Thank you!
|
|
|
chen xinyu
|
Sep 22, 2009 - 12:03 AM
|
I am sorry. I don’t understand what is your meaning of "command handler and command updating methods"? Do you mean I should use the g_CmdManager->UpdateFromMenu() function? I also want to know if the DoDataExchang() function works. Thanks a lot.
|
|
|
Technical Support
|
Sep 21, 2009 - 1:07 PM
|
Toolbar buttons, ribbon bar buttons and menu items are controlled by the MFC’s command updating mechanism. If you have 3 radio buttons with the ID_RADIO1, ID_RADIO2 and ID_RADIO3 command identifiers, then you should add command handler and command updating methods for all these commands. The command handler methods will be invoked on radio button clicks. The command updating methods will be invoked for setting the checked state of each radio button.
|
|
|
chen xinyu
|
Sep 22, 2009 - 12:09 AM
|
I am sorry. I don’t understand what is your meaning of "command handler and command updating methods"? Do you mean I should use the g_CmdManager->UpdateFromMenu() function? I also want to know if the DoDataExchang() function works. Thanks a lot.
|
|
|
Technical Support
|
Sep 23, 2009 - 5:03 AM
|
We mean the radio buttons in the ribbon bar should be implemented exactly in the same way like radio buttons in the classic MFC toolbars and menus.
|
|
|
Anil Siddhpura
|
Sep 18, 2009 - 1:00 AM
|
Hi,
Can i customize the reports created through CExtReportGirdWnd?
Can i set any particular row that should not have effect of sorting & Grouping?
Can i create subcolumns inside main header column?
How to use the other class of reportgrid (i.e. CExtReportGridDataProvider, CExtReportGridGroupAreaWnd, etc)?
|
|
|
Anil Siddhpura
|
Sep 22, 2009 - 7:16 AM
|
Hi,
But i want to customize my reports, which were created through CExtReportGridWnd, and i want to put somthing like tables, header, footer inside my reports. So, how can i customize reports like that?
|
|
|
Technical Support
|
Sep 24, 2009 - 4:19 AM
|
This will be available soon. We are working on the HTML support everywhere in Prof-UIS, including custom HTML based page headers and footers in print preview.
|
|
|
Anil Siddhpura
|
Sep 24, 2009 - 5:22 AM
|
Hi,
Pl let me know as soon as it is available. I really need that urgently.
|
|
|
Technical Support
|
Sep 18, 2009 - 2:44 PM
|
The CExtReportGridWnd control is a classic grid control displaying data rows in plain or grouped modes and one header row at top. The report data provider component is just internal part of the report grid control which helps to sort and group the data rows. The control you need is some kind of compound grid control with cell area joins inside data and header areas. Please take a look at the SynchronizedGrids sample application.
|
|
|
Itay Shahaf
|
Sep 15, 2009 - 9:39 AM
|
Hi, How can I make CExtGridCellStringDM cell editable (so the user will be able to enter text into it)? Thanks
|
|
|
Technical Support
|
Sep 18, 2009 - 2:45 PM
|
The SiwModifyStyle() method is always invoked at the beginning of the grid control initialization and it always contains focus/selection/scrolling settings. Please search for this method invocation in the SimpleGrids sample application and you will find all the required styles you should use. The most often used scrolling strategies in grid controls are horizontal pixel-by-pixel scrolling and vertical item-by-item scrolling. These strategies are applied by the __ESIS_STH_PIXEL|__ESIS_STV_ITEM styles. The focus selection models are applied with the __EGBS_SF*** styles.
|
|
|
Itay Shahaf
|
Sep 17, 2009 - 9:40 AM
|
Hi, Still doesn’t work... I’m using a grid that inherits from CExtReportGridWndExt. In the grid initialization I’m using: m_gridSource.BseModifyStyle(__EGWS_BSE_EDIT_CELLS_INNER |__EGWS_BSE_EDIT_SINGLE_LCLICK | __EGWS_BSE_EDIT_RETURN_CLICK); and then in every column I’m using: // Col 1 / ....
pRGC = _listColumns.GetNext( pos );
pCell = ReportItemGetCell( pRGC, pRGI, RUNTIME_CLASS(CExtGridCellStringDM) );
ASSERT_VALID( pCell );
strPropVal.Format("%f", m_vecData[nRow].m_fCol1);
pCell->TextSet(strPropVal); ..... Thanks!
|
|
|
Technical Support
|
Sep 18, 2009 - 3:39 AM
|
The problem is not hidden in the CExtGridCellStringDM class. Did you override any virtual methods of the CExtGridWnd class? The CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() method analyzes grid cell mouse clicks and invokes the CExtGridWnd::OnGbwBeginEdit() method for cell editing. You can set breakpoint into the CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() method and try to analyze why the CExtGridWnd::OnGbwBeginEdit() method does not become invoked.
|
|
|
Technical Support
|
Sep 16, 2009 - 11:08 AM
|
The __EGWS_BSE_EDIT_CELLS_INNER grid window style allows you to edit all inner data grid cells in the grid control. Other __EGWS_BSE_EDIT_*** styles are defined to enable cell in-place editor activation on different input events.
The __EGCS_NO_INPLACE_CONTROL grid cell disables editing a particular grid cell object.
|
|
|
Itay Shahaf
|
Sep 17, 2009 - 12:32 PM
|
So, what’s wrong with my code? Maybe it’s the fact that I can’t select a single cell (a click on the grid selects the whole row)? Thanks.
|
|
|
Technical Support
|
Sep 18, 2009 - 7:37 AM
|
How do you initialize your grid control? Which focus/selection model is applied in it?
|
|
|
Itay Shahaf
|
Sep 18, 2009 - 1:21 PM
|
I’m not using any focus/selection model. Which model should I use?
|
|
|
Zoltan Bokor
|
Sep 14, 2009 - 5:00 AM
|
Did you schedule a new version of Prof-UIS till the release of Windows 7 on October 22 ?
|
|
|
Technical Support
|
Sep 14, 2009 - 7:55 AM
|
Yes. We are testing the next version right now. We have the official release version of Windows 7 which is currently available for subscribers only. Everything works on it.
|
|
|
Simp S
|
Sep 9, 2009 - 4:13 AM
|
Hi, I am using Progress Control derived from CExtProgressWnd.It works fine. My question is how can I change the color with gradient effects. By default its foreground color is green. Thanks
|
|
|
Technical Support
|
Sep 10, 2009 - 2:37 AM
|
The CExtProgressWnd control paints itself via the paint manager. There are no pre-defined colors. The CExtPaintManager paint manager draws the progress manually using classic windows colors. The CExtPaintManagerNativeXP paint manager draws the progress through Windows XP / Vista / 7 theming APIs provided by the UxTheme.DLL module. The Office 2007 and XML skin paint manager draws the progress using the bitmap based skin elements and XML based skin painting rules. If you need to draw some custom progress, you should implement progress painting from scratch.
|
|
|
Isabelle Carrier
|
Sep 8, 2009 - 8:18 AM
|
The filtering icon in the column header of the grid seems to be hard set in the code somewhere. Or at least we didn’t find the image resource file in the skin. How can we change it? Thank you
|
|
|
Technical Support
|
Sep 8, 2009 - 1:20 PM
|
The filter icon is like icons on toolbar buttons and menu items. The filter icon is the non-skin element. But it can be changed. Here is the explanation to show to your developers:
Please override the CExtGridCellHeaderFilter::OnPaintButton() virtual method. The nButtonType parameter can be INT(CExtGridCell::__EBTT_FILTER_APPLIED) or INT(CExtGridCell::__EBTT_FILTER_UNAPPLIED) value in case of method is invoked to paint filter button. You should not invoke the parent class method and paint your icon instead.
|
|
|
Isabelle Carrier
|
Sep 8, 2009 - 8:01 AM
|
I was very happy when I saw that the skin supported the PNG’s transparency. And I thought that I could use that to change slightly the shape of a window by drawing a different shape (ie square with rounded corners) in the /WindowNcArea/FrameActive.png file. But there seem to be a mask or something applied, and it forces the transparency to be only at the rounded corners, making any transparent part of my PNG white. You can see an example of what I mean at the following link: http://tinyurl.com/n5kmc9 . Gray being the shape of the box I want, and the white block should be transparent. My question is, is this a Windows thing that we can’t change or something in Prof-UIS that we can go in and tweak? Like maybe a file that serves as a alpha channel/mask or something like that? Thank you
|
|
|
Technical Support
|
Sep 8, 2009 - 1:20 PM
|
This is the current limitation of window frame skin. The rounds on corners should be enough small: not greater then resizing border width/height. So, we can assume your message as a feature request. Besides, in case of frame the transparency is supported only for two transparent states: completely transparent and completely opaque. Simply saying, this is limitation of MFC. Windows supports per-pixel window transparency. Such per-pixel transparent windows are called layered windows. They are very specific and they never have child windows (toolbars, views, status bars). Normal application always have several child windows inside each its desktop window.
|
|
|
jk
|
Sep 5, 2009 - 1:19 PM
|
Hi,
I already use an up-down button in a cell by using "ModifyStyle( __EGCS_BUTTON_UPDOWN )" Can I create another __EGCS_BUTTON_UPDOWN in the same cell?
Thanks,
|
|
|
Technical Support
|
Sep 8, 2009 - 1:53 AM
|
Prof-UIS grid cells support only 3 built-in buttons: up-down (spin control like), drop down (combo box like) and ellipsis (. . . - 3 dots). If you need two drop down buttons, then you can simply re-paint the ellipsis button and make it looking like dropdown button. You need to override the CExtGridCell::OnPaintButton() virtual method for that.
|
|
|
Jordi Cruzado
|
Sep 4, 2009 - 5:21 AM
|
I’m trying to delete columns in a CExtListCtrl and I get an Assertion. I’m using 2.85 version. This assertion is from the next lines: case HDM_DELETEITEM:
{
ASSERT( m_arrExtendedData.GetSize() == GetItemCount() );
m_arrExtendedData.RemoveAt( ( int ) wParam );
ASSERT( m_arrExtendedData.GetSize() == GetItemCount() );
_CancelActions();
}
break; located in the file: extcontrolscommon.cpp belonging to the function: LRESULT CExtHeaderCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) I use DeleteColumn(0) from CListCtrl to remove column number 0 (but I have also the same problem trying to delete any column) I think the second assertion (the one in red) must be wrong and it must be like: ASSERT( m_arrExtendedData.GetSize() == GetItemCount() - 1 );
Is it right?. Or I’m doing something incorrect?
|
|
|
Technical Support
|
Sep 4, 2009 - 1:21 PM
|
|
|
|
|
KMW USA
|
Sep 3, 2009 - 6:29 PM
|
Hi,
How can I use either CExtGridCell or CExtPropertyGridCtrl on CView of MDI architecture?
I’m trying to find an example, but can’t. Most examples with CExtGridCell were with CExtResizableDialog or CExtDynamicControlBar.
If possible, would you show me an example.
Thanks, Jongheon.
|
|
|
jk
|
Sep 5, 2009 - 1:11 PM
|
|
|
|
|
Technical Support
|
Sep 4, 2009 - 1:51 PM
|
You can create a property grid control as a child of any window, including MFC views. Please provide us with more exact details about which sample application you need? Which view window type should it use? You can create a test project and send it to us (the support mail box at this web site). We will modify it and created property grid anywhere you need.
|
|
|
Michael chang
|
Sep 2, 2009 - 12:37 AM
|
I am using many resizable CExtControlbar. I want to set a minimun(or maximum) width and height for each CExtControlbar How can i set the size of the CExtcontrolbar?
|
|
|
Technical Support
|
Sep 2, 2009 - 1:00 PM
|
The CExtControlBar window is designed as a fully resizable without any limits. It’s not a very good idea to limit its size. The size of one particular CExtControlBar window typically mutually depends from sizes of other neighborhood CExtControlBar windows. But you can override the CExtControlBar::_CalcDesiredMinHW() virtual method and return the minimal width, the CExtControlBar::_CalcDesiredMinVH() virtual method and return the minimal height, the CExtControlBar::_CalcDesiredMinFloatedSize() virtual method and return the minimal floating bar size.
|
|
|
L Freddi
|
Sep 1, 2009 - 9:02 PM
|
There are two CExtControlbars. I place the contorls at bottom line in the main frame as 50:50 ratio
But when I make a control hide and show, It become smaller in size horizontally.
How to solve the problem?
|
|
|
Technical Support
|
Sep 2, 2009 - 12:59 PM
|
Please show us the source code which is used for docking your control bars initially.
|
|
|
L Freddi
|
Sep 1, 2009 - 8:36 PM
|
I create two CExtControlbars. Both don’t have autohide button.
But when a control bar dock inside another control bar, an autohide button is shown.
How to hide the button on Controlbar at that time?
|
|
|
Technical Support
|
Sep 2, 2009 - 12:59 PM
|
|
|
|
|
marc uchida
|
Aug 27, 2009 - 3:09 PM
|
I am trying to get help from your support forum, and search results do give me links to cases that should help me with my questions, but most of them (possible an age thing) just take me to your home page. This is useless obviously, and kind of cruel to taunt me with an answer just there beyond my reach. ;)
|
|
|
Technical Support
|
Aug 28, 2009 - 3:11 AM
|
Thank you for your feedback. Could you give us one or more examples of wrong results (i.e. those that lead to the default page)?
|
|
|
marc uchida
|
Aug 31, 2009 - 11:40 AM
|
|
|
|
|
Seung Cheol Lee
|
Aug 24, 2009 - 2:07 AM
|
When I double-clicked at the space of toolbar, the user customize dialog was opened. I would like not to open the user customize dialog.
|
|
|
Technical Support
|
Aug 24, 2009 - 11:24 AM
|
Please override the CExtCustomizeSite::DoFormCustomization() virtual method:
virtual bool DoFormCustomization( bool bDelayShow = false )
{
CWinThread * pWT = ::AfxGetThread();
ASSERT_VALID( pWT );
if( pWT->m_msgCur.hwnd != NULL && pWT->m_msgCur.message == WM_LBUTTONDBLCLK )
{
CWnd * pWnd = CWnd::FromHandlePermanent( pWT->m_msgCur.hwnd );
if( pWnd != NULL )
{
ASSERT_VALID( pWnd );
CControlBar * pControlBar = DYNAMIC_DOWNCAST( CControlBar, pWnd );
if( pControlBar != NULL && pControlBar->IsDockBar() )
return false;
}
}
return CExtCustomizeSite::DoFormCustomization();
}
|
|
|
Douglas Hoppes
|
Aug 20, 2009 - 11:29 AM
|
Hi all,
Hope that this is simple. I would like to have my own GridCellComboBox. In my current code, I have:
------------------------------------------------- .h file: // Inner Classes class CMarkerComboBox : public CExtGridCellComboBox { public: // Constructors/Destructor CMarkerComboBox(CExtGridDataProvider *pDataProvider = NULL); ~CMarkerComboBox();
// Methods virtual bool OnPopupListBoxItemDraw(CExtPopupInplaceListBox & wndListBox, CExtGridCell::TrackCellStateInfo_t & _tcsi, LPDRAWITEMSTRUCT pDIS); };
.cpp file: CGridControl::CMarkerComboBox::CMarkerComboBox(CExtGridDataProvider * pDataProvider /*= NULL */) :CExtGridCellComboBox(pDataProvider) { AfxMessageBox("Here I am: Constructor"); }
CmbfGridControl::CMarkerComboBox::~CMarkerComboBox() { AfxMessageBox("Here I am: Destructor"); }
bool CmbfGridControl::CMarkerComboBox::OnPopupListBoxItemDraw(CExtPopupInplaceListBox & wndListBox, CExtGridCell::TrackCellStateInfo_t & _tcsi, LPDRAWITEMSTRUCT pDIs) { AfxMessageBox("Here I am: PopupListBoxItemDraw"); return true; } -------------------------------------------------
To create the MarkerComboBox, I use:
CMarkerComboBox * pCellComboBox = STATIC_DOWNCAST(CMarkerComboBox, GridCellGet(i, lCurrentRow, 0, 0, RUNTIME_CLASS(CMarkerComboBox)));
When running the application, I put a couple of breakpoints in the CMarkerComboBox, but none of the breakpoints are hit. So, obviously, I must not be creating my sub-class correctly.
Any help is greatly appreciated.
Doug
|
|
|
Technical Support
|
Aug 21, 2009 - 4:01 AM
|
You forgot to add run-time type information and data provider memory management features to your grid cell class. The grid cell classes require the DECLARE_SERIAL, IMPLEMENT_SERIAL and IMPLEMENT_ExtGridCell_Clone macroses. The DECLARE_SERAIL and IMPLEMENT_ExtGridCell_Clone macroses should be inserted into the class declaration:
class CMarkerComboBox : public CExtGridCellComboBox
{
public:
DECLARE_SERIAL( CMarkerComboBox);
IMPLEMENT_ExtGridCell_Clone( CMarkerComboBox, CExtGridCellComboBox );
// Constructors/Destructor
CMarkerComboBox( CExtGridDataProvider *pDataProvider = NULL );
~CMarkerComboBox();
// Methods
virtual bool OnPopupListBoxItemDraw( CExtPopupInplaceListBox & wndListBox, CExtGridCell::TrackCellStateInfo_t & _tcsi, LPDRAWITEMSTRUCT pDIS );
};
The IMPLEMENT_SERIAL line of code should be inserted at the very beginning of some .CPP file in your project and you should put it before declaration of the MFC’s debug version of C++ new operator: IMPLEMENT_SERIAL( CExtGridCellFontFaceName, CExtGridCellComboBox, VERSIONABLE_SCHEMA|1 );
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
|
|
|
Douglas Hoppes
|
Aug 19, 2009 - 1:48 PM
|
Hi all,
I’m not sure how to do this. In my MFC code, I override the DrawItem method of CComboBox, so that I can paint some very specific fonts into the drop list.
How do I do this with the CExtGridCellComboBox?
Doug
|
|
|
Technical Support
|
Sep 2, 2009 - 1:01 PM
|
You should implement the following virtual method of the CExtGridCell class for measuring and re-painting the cell’s text area:
virtual CSize OnMeasureTextSize(
const CExtGridWnd & wndGrid,
CDC & dc,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
const RECT & rcCellText,
DWORD dwAreaFlags
) const;
virtual void OnPaintText(
const RECT & rcCellText,
const CExtGridWnd & wndGrid,
CDC & dc,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
const RECT & rcVisibleRange,
DWORD dwAreaFlags,
DWORD dwHelperPaintFlags
) const;
|
|
|
Douglas Hoppes
|
Aug 31, 2009 - 8:34 AM
|
Thanks for the help with the combo box. I was able to sub-class my combo-box and show my individual images in the drop-down list. So, when I pass a DWORD value, I can go to my font file and actually display a replacement icon for the DWORD, which is great.
The final issue that I have with this is that owner drawn image that is present in the droplist is not present in the cell. For example, if the DWORD value = 3, I show a "Filled-in square" in my droplist. If I picked that "Filled-in Square", the grid cell shows the value 3, not the "Filled-in Square".
Doug
|
|
|
Technical Support
|
Sep 1, 2009 - 9:58 AM
|
You shoul implement the following virtual methods of the CExtGridCell class to paint your image instead of built-in grid cell icon:
virtual void OnPaintIcon(
const CExtCmdIcon * pIcon,
const RECT & rcIcon,
const CExtGridWnd & wndGrid,
CDC & dc,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
const RECT & rcVisibleRange,
DWORD dwAreaFlags,
DWORD dwHelperPaintFlags
) const;
virtual CSize IconGetSize() const;
|
|
|
Douglas Hoppes
|
Sep 2, 2009 - 9:19 AM
|
That’s excellent! Works beautifully! One final question: Now, my combobox shows the list of my owner draw items and I can see the owner drawn item in the grid control. However, the text data in the combobox still shows. Is there a way of not having it show?
Doug
|
|
|
Technical Support
|
Aug 19, 2009 - 2:35 PM
|
The CComboBox and CExtComboBox classes are wrappers for the combo box common control. The CExtGridCellComboBox class is the non HWND-based UI element which implements combo box like looking grid cell. The combo box window and combo box grid cell are two absolutely different UI element which are not based on each other. We have the CExtGridCellFontFaceName class which is derived from the CExtGridCellComboBox class and implements the font face picker cell. This class probably the ready to use solution for you or at least you can use its source code as a sample.
|
|
|
Douglas Hoppes
|
Aug 31, 2009 - 8:57 AM
|
Thanks for the help with the combo box. I was able to sub-class my combo-box and show my individual images in the drop-down list. So, when I pass a DWORD value, I can go to my font file and actually display a replacement icon for the DWORD, which is great.
The final issue that I have with this is that owner drawn image that is present in the droplist is not present in the cell. For example, if the DWORD value = 3, I show a "Filled-in square" in my droplist. If I picked that "Filled-in Square", the grid cell shows the value 3, not the "Filled-in Square".
Doug
|
|
|
Bart Kampers
|
Aug 17, 2009 - 8:41 AM
|
Hello, I want the cells in my CExtGridWnd to have widths so that they exactly fit in the grid’s area. I tried to use GetClientRect to find out the area width but this does not give the correct size. It seems that I alway have to distract 64 from this size whether the scrollbars are show or not. What is the proper way to retrieve the grid area? Thanks, Bart.
|
|
|
Technical Support
|
Aug 17, 2009 - 1:46 PM
|
The Prof-UIS grids controls support the proportional resizing feature for both columns and rows. We will explain you how to use this feature for columns of the CExtGridWnd control. First of all, you should disable horizontal scrolling in your grid control. This means you should use the __ESIS_STH_NONE style in invocation of the SiwModifyStyle() method - not an any other __ESIS_STH_*** style. Second, you should apply the __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS style with invocation of the method. The proportional column widths are stored in the top header cells. You should invoke the CExtGridCell::ExtentPercentSet() method of header cells at top to specify how the cells should be resized proportionally. The columns still support minimal/current/maximal widths in pixels. These widths can be set using the CExtGridCell::ExtentSet() method. So, you can set some initial widths in pixels. If all the minimal/current/maximal widths are equal, then column is not resized proportionally and it cannot be resized by user.
|
|
|
Bart Kampers
|
Aug 18, 2009 - 9:33 AM
|
Thanks for your response. This already works very nice but I’d like it to be a little bit nicer ;) I would like to resize colums as the data in the grid changes. All columns have to be as wide so the contents fit. The last column must stretch the free space. I made an "UpdateColumnWidths" method which is called as soon as the data in the grid is updated. I messed around a bit with "BestFitColumn" but I did not manage to get it right. So, what can I do to get this done? Also, I noticed that "BestFitColumn" sometimes goes wrong when all rows in a column contains one character.
|
|
|
Technical Support
|
Aug 18, 2009 - 12:42 PM
|
It’s possible to use best fitting and proportional resizing at the same time. But we do not recommend you to do this. Both features will constantly try to resize columns in their own manner. Best fitting is better without proportional resizing. The CExtGridWnd::BestFitColumn() method can change widths of a data column, header column at left or at right depending on the nColType parameter. One invocation of the CExtGridWnd::BestFitColumn() method changes widths of one column only. The column number is specified int the nColNo parameter. This method measures widths of the column’s grid cells before change column widths. The bDoBestFitByOuterCells, bDoBestFitByInnerCells and bDoBestFitByVisibleRowRangeOnly flag parameters determine which grid cells should be measured. The bDoBestFitByOuterCells flag specifies whether header cells at top/bottom should be measured in the nColNo column. The bDoBestFitByInnerCells flag specifies whether data cells should be measured and if this flag is true, then the bDoBestFitByVisibleRowRangeOnly flag determines whether only displayed on the screen data cells should be measured. If you want to make your grid automatically changing column widths after applying any editing results, then you should override the CExtGridWnd::OnGridCellInputComplete() virtual method, invoke parent class method from it and finally invoke the CExtGridWnd::BestFitColumn() method. If your code handles editing of some column’s cells and changes data in other columns, then you may need to invoke the CExtGridWnd::BestFitColumn() method for other columns too.
|
|
|
Chris G.
|
Aug 17, 2009 - 7:42 AM
|
Hello Prof-UIS, i created a grid (instance of CExtPPVW<CExtGridWnd>) with a vertical scrollbar by adding a CExtScrollBar member to the grid class and overriding the GetScrollBarCtrl(int nBar) method. Everything works fine so far. If the rows need more space than visible then the scrollbar appears. But now i would like to have the scrollbar always visible, even if there are less rows visible than required. In that case the scrollbar should be disabled. How can this be achieved? Thanks in advance & regards,
Chris
|
|
|
Chris G.
|
Aug 17, 2009 - 5:01 PM
|
Thank you again for the good support! Regards,
Chris
|
|
|
Technical Support
|
Aug 17, 2009 - 11:48 AM
|
First of all, you can use the CExtNSB template class to add themed scroll bars to any CExtScrollWnd-based scrollable control such as CExtGridWnd. You can simply use the CExtPPVW < CExtNSB < CExtGridWnd > > template based type. Please invoke the CExtScrollItemWnd::SiwAutohideScrollBarSet() method to disable scroll bar auto hiding.
|
|
|
Chris G.
|
Aug 17, 2009 - 7:28 AM
|
Hello Prof-UIS, is there a way to limit the minimum width and height of a CExtControlBar instance? I would like to prevent the user resizing some of my control bars to dimensions smaller than their content. Regards,
Chris
|
|
|
Chris G.
|
Aug 17, 2009 - 4:59 PM
|
Thank you, that was exactly what i needed. Regards,
Chris
|
|
|
Technical Support
|
Aug 17, 2009 - 11:48 AM
|
The minimal width is computed by the CExtControlBar::_CalcDesiredMinHW() virtual method, minimal height is computed by the CExtControlBar::_CalcDesiredMinVH() virtual method:
virtual INT _CalcDesiredMinHW() const;
virtual INT _CalcDesiredMinVH() const;
|