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 » Combo on Toolbar selection problem Collapse All
Subject Author Date
Neville Franks Jun 28, 2004 - 5:20 AM

Hi,
When I click on a combo box on a toolbar it gets focus but the current text isn’t selected. The Prof-UIS ProfStudio sample does select the combo text.


My code uses:

 pCmdItem = g_CmdManager->CmdGetPtr( pszUIRegKey, ID_SearchCombo );
 pCmdItem->StateSetCombo();
 pCmdItem->StateSetResizable();
 pCmdItem->m_nTextFieldWidth = pCmdItem->m_nDropDownWidth = 100;
 pCmdItem->m_nDropDownHeightMax = 116;

whereas the ProfStudio code uses CExtComboBox etc. I don’t know if this is relevant.


So how do I get the combo text selected when the combo gets focus?


I’m using Prof-UIS 2.24.


Thanks,
Neville

Technical Support Jun 28, 2004 - 10:15 AM

Dear Neville,

Please let us know whether you use combo box windows with toolbar buttons or built-in combo field buttons?

Neville Franks Jun 28, 2004 - 3:11 PM

Hi,
I assume they are built-in combo field buttons. My code is similar to your StyleEditor sample and you can see this same issue with that program. ie. Click in any of the 3 combo’s and the current item is not selected.

Technical Support Jun 29, 2004 - 3:41 AM

Dear Neville,

Thank you for an interesting question. We have not found a way to make the editor’s text selected when the popup listbox is displayed because the edit control exists only when the user is typing the text. In all other cases the CExtBarTextFieldButton class just paints the toolbar button like an edit control. We need some time to takle this problem.

Neville Franks Jun 30, 2004 - 1:28 AM

Ok, Thanks I’ll wait.


I assume I can always change the code to create the Combobox myself like the Prof-Studio sample code to work-around this issue?

Technical Support Jun 30, 2004 - 3:25 AM

Dear Neville,

Of course you can use combo-boxes in the toolbars instead of built-in text/combo fields. But you will lose some important features:


  • only built-in text/combo fields can be drag-and-dropped in the customize mode

  • only built-in text/combo fields can be used in popup menus (for example, popup items in the menu bar and popup menu invoked with the toolbar’s chevron button ( or the Toolbar Options button ))

  • the CExtCustomizeSite class provides automatic synchronization of multiple copies of a text/combo field anywhere

  • having chosen the combo box control, you will have to keep all list box string values in the control’s memory

We believe you will decide on Prof-UIS’s built-in text/combo fields even without support for highlighted text when the popup list box is displayed.

Neville Franks Jun 30, 2004 - 4:50 AM

Thanks for all the extra information. I will stay with the built-in text/combo fields, however I think it is important that the selection problem be addressed for two reasons. 1) It is standard Windows behaviour. 2) It is quite annoying to have to manually delete the existing text before you can type something new.


I’m using this text/combo to let the user enter text they want to search for and using the combo as a history. Most of the time you want to enter new search text. If it is selected then of course there is no problem as the selection is deleted when the first new character is typed.


Thanks,
Neville