Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtGridCellBool question Collapse All
Subject Author Date
Offer Har Feb 14, 2008 - 10:42 AM

Dear Support,

I have cells of type CExtGridCellBool.
I need to add an intermediate state to this cell.
I do it using the __EGCS_CHK_INDETERMINATE flag.
When in intermediate state I want to remove the text from the cell, but cannot, it allows to display only the true and false value.
How can I clear the text for that case?

Thanks,
Ron.

Offer Har Feb 21, 2008 - 7:19 AM

Dear Support,

I think that should not be a language specific texts in the source-code, only in the resource file, so maybe it’s better to default them to empty strings...

The second issue - It’s not completely true, because in many places you do not need to monitor the change in state, only the check the state when
Apply is needed.

I very common characteristic of the 3 state is that when pressed the intermediate state is removed is something that is common.
Adding a flag for this sound to me as a reasonable and simple feature to add to this great library...

Thanks,
Ron.

Technical Support Feb 21, 2008 - 7:00 AM

We think the Yes/No/Default, Set On/Set Off/Inherit From..., True/False/Indeterminate, Available/Unavailable/Unknown and other possible strings of 3-state check boxes are really very specific to each particular project and may have various translations for different languages.

We can add the feature (turning off the 3-state mode automatically) but we think your code as well as any other project will handle each state changing of each 3-state check box and this is the place where the input will be verified and 3-state mode will be optionally turned off depending on the input validation specific for particular project.

Offer Har Feb 18, 2008 - 6:04 AM

This sound about right.
One concern here is that the global strings are hard-coded inside the code, and not in the resource file (which was also the case before).

What do you say about the feature to automatically remove the 3 state when the user clicks the check-box? can you add this as well?

Technical Support Feb 18, 2008 - 4:04 AM

Thank you for sharing your ideas with us. We would like to discuss the finally formed feature request.

We added the CExtGridCellBool::g_strTextIndeterminate static property of CString type and _T("Indeterminate") is used as the default value. May be it would be more correct to port it to the CExtGridCellCheckBox class but the CExtGridCellBool::g_strTextTrue and CExtGridCellBool::g_strTextFalse static properties are already enough long time declared in scope of the CExtGridCellBool class so we would prefer to keep the compatibility with older Prof-UIS versions. We added the m_sLabelTrue, m_sLabelFalse and m_sLabelIndeterminate internal properties and CExtGridCellCheckBox::LabelTextGet()/CExtGridCellCheckBox::LabelTextSet() methods to the CExtGridCellCheckBox class. So, the CExtGridCellCheckBox class is now equally customizable as the CExtGridCellBool class and you can assign custom automatically changeable text values: 3 for check box cell and 2 for bool cell.

|Please let us know any additional details you need.

Offer Har Feb 17, 2008 - 8:41 AM

I made a mistake in the previous post - I enhanced CExtGridCellCheckBox not CExtGridCellBool.
Basically it was adding the two strings for true & false instead of using the static variables you borrowed from CExtGridCellBool for the AutoTextMode.

If you can please incorporate this into the next version of CExtGridCellCheckBox.

Another feature I added to CExtGridCellCheckBox was that when in 3 state mode, and user clicks the box, the check-box removes automatically the 3 state - what happens now is that when you set 3 state mode, clicking the box will go though the intermediate state, which is not a good idea, as we uses the intermediate state because there is no user input.

If you can add this feature into the next version let me know.

If you want I can send you the modified files.

Thanks,
Ron.

Offer Har Feb 17, 2008 - 5:53 AM

My problem is that I need the text assignment to true & false implemented in CExtGridCellBool , and the 3 state implemented in CExtGridCellCheckBox.
I think this should be done in the library level, and not by me.
As it looks now, I will change the class CExtGridCellBool to support 3 state. If you want, I can send you the update, and you can add this for future builds.

Technical Support Feb 14, 2008 - 11:54 AM

We would recommend you use the CExtGridCellCheckBox grid cell instead. It supports the intermediate state and looks like a 3-state checkbox common control. This class may completely meet your requirements. You can also apply the __EGCS_EX_UNDEFINED_ROLE extended grid style to any grid object. This style is widely used in the property grid control. Any grid cell with this style looks as it is empty. The property grid control applies this style to grid cells representing combined property values which have different initial values.