Originally posted by: Kenn Jacoby
I am looking through the controls for MFC CComboBox and cannot find an attribute that would let me make my combobox uneditable. For example, I have the ComboBox populated with the following strings:
'entry1'
'entry2'
'entry3'
If 'entry1' is the current selection, then it shows up in the ComboBox display. If I want to exclude the user from editing that field to be something other than what is in the list of entries, and have them only be able to choose from the available list of entries, what must I do?
ReplyOriginally posted by: Muthukkumaran
It's very nice to see tooltips on the dropped list.
Thanks to Edward Antonyan.
Special Thanks to Andrew for Resetting the dropped width.
Muthu
ReplyOriginally posted by: Emmanuel D. Mania
hi there, please help me, im a beginner, i just want to know the most easy way to enter choices in a combo box or the drop down list box.
ReplyOriginally posted by: Yair Konfino
Working on first run :-)
ReplyOriginally posted by: Andrew
The first problem is that on initial creation of the app, the child window and the main window get confused as to who is higher in the z order. When I click on the main window, the child gets focus when I click on the child window, the main window gets focus.
The second problem is that as the child window is moved around, it stays behind the main window.
This problem only occurs in WinNT and is not present in Win2000. The problem goes away the first time I select an item from the combo box.
The child is created at run time as follows:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct){
m_wndChild.Create(this, IDD_CHILD_DIALOG);
...
return 0;
Any ideas?
I used this class in a child window of an mdi app.
...
m_wndChild.ShowWindow(TRUE);
}
Reply
Originally posted by: Paul
I added some code to help with my SORTED combo box because when I was using AddString my string indexes were changing but my tooltip indices were not. It looked like this:
---------------------------------------------------
if ( nRow < m_pComboParent->GetCount( ) )
m_itemToTip[nRow] = sTip;
Nice work! The post of (2001/04/24) works fine for fixing the SelChange notification, why does the question keep being asked?
int CTooltipComboBox::AddStringAndTooltip(
const CString &dropDownString,
const CString &toolTip)
{
int entryNum = AddString((LPCTSTR) dropDownString);
m_lstCombo.InsertItemTip(entryNum, toolTip );
return (entryNum);
}
---------------------------------------------------
int CTooltipListCtrl::InsertItemTip(
int nRow,
CString sTip)
{
if (nRow < 0)
return -1;
{
for (int i = m_pComboParent->GetCount( ) - 1; i >= nRow; --i)
m_itemToTip[nRow + 1] = GetItemTip(i);
}
return nRow;
}
----------------------------------------------------
Originally posted by: aqi
how to trigger the event of onselchange
Originally posted by: BOURDAUD'HUI
Nice job,
Is it possible to have multi line tooltips, and how ???
Thank's
Pascal
Originally posted by: JP
Only English please
ReplyOriginally posted by: Orit
Hello,
How can I use it on a ComboBox I create dynamicly during the running program?
Thanks,
Orit