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 » Two buttons in one cell Collapse All
Subject Author Date
Offer Har Feb 29, 2008 - 8:20 PM

Dear Support,

I need to display two buttons in one cell, and change their appearance.
I know how to do it with one (I add __EGCS_BUTTON_ELLIPSIS and in OnPaintButton I set __EGCPF_NO_BUTTON_ELLIPSIS_DOTS)
I added __EGCS_BUTTON_DROPDOWN, but I faced the glyph removal problem - I couldn’t find a matching __EGCPF_NO_BUTTON_XXX flag

I looked into and I see this code:

...
	if( nButtonType == INT(__EBTT_DROPDOWN) )
		pGlyph = 
			CExtPaintManager::g_DockingCaptionGlyphs[
				(INT) CExtPaintManager::__DCBT_ARROW_DOWN
				];
	else if( nButtonType == INT(__EBTT_ELLIPSIS) )
	{
		if( (dwHelperPaintFlags&__EGCPF_NO_BUTTON_ELLIPSIS_DOTS) == 0 )
			pGlyph = 
				CExtPaintManager::g_DockingCaptionGlyphs[
				(INT) CExtPaintManager::__DCBT_ELLIPSIS
				];
	}
	else if( nButtonType == INT(__EBTT_UPDOWN_UP) )
		pGlyph = 
			CExtPaintManager::g_DockingCaptionGlyphs[
				(INT) CExtPaintManager::__DCBT_ARROW_SMALL_UP
				];
...


So, there is no way to get rid of the arrow glyph.
What I did is that before the call to the Base OnPaintButton, I added this:
    if (nButtonType==__EBTT_DROPDOWN) nButtonType = 10;// Shome out of range value...

This is ugly, but it works...

Can a flag for not drawing the dropdown glyph be added to the next release?

Thanks,
Ron.

Technical Support Mar 4, 2008 - 2:42 AM

Thank you for your advice. We have just added a new style __EGCPF_NO_BUTTON_DROPDOWN_ARROW. When this style is applied, the default drop-down button is painted with no arrow. You can either wait for the next release or request the updated sources right now.