Default data in data tab of combo box not working
-
Hello all, i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using
AddString()
method. Please help me out with this !!! any help will be highly appreciated !! regards Sujay -
Hello all, i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using
AddString()
method. Please help me out with this !!! any help will be highly appreciated !! regards SujayI'm sure the values are being populated, but you're not seeing any by default because none has been selected. Try viewing the list contents of the combo box by clicking on its down arrow. Do you see the items there? If you do and want the first to be selected by default, use the
CComboBox::SetCurSel()
method.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Hello all, i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using
AddString()
method. Please help me out with this !!! any help will be highly appreciated !! regards SujaySujay chakraborty wrote:
...when i run that application i find no data present in the combo box...
How are you verifying this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Sujay chakraborty wrote:
...when i run that application i find no data present in the combo box...
How are you verifying this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
hello David, Actually i have tried a few steps for this..... -- I have clicked on the down arrow key in combo box to check for data -- I have tried to set default selection using
CComboBox::SetCurSel()
method but i have found a strange pattern in this the moment i run a combo box within Win32 Wizard Application rather than empty project of win32 app (which i have done earlier) i found the combo box to be running absolutely perfect. :omg: I found it weired but couldn't figure out the reason for this to happen.!!!:~ -
hello David, Actually i have tried a few steps for this..... -- I have clicked on the down arrow key in combo box to check for data -- I have tried to set default selection using
CComboBox::SetCurSel()
method but i have found a strange pattern in this the moment i run a combo box within Win32 Wizard Application rather than empty project of win32 app (which i have done earlier) i found the combo box to be running absolutely perfect. :omg: I found it weired but couldn't figure out the reason for this to happen.!!!:~Sujay chakraborty wrote:
-- I have clicked on the down arrow key in combo box to check for data
Are you sure the list-part of the combobox is large enough? By default, it isn't. It's kludgy, but you can call the combobox's
GetCount()
method to see how many items are in it."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Sujay chakraborty wrote:
-- I have clicked on the down arrow key in combo box to check for data
Are you sure the list-part of the combobox is large enough? By default, it isn't. It's kludgy, but you can call the combobox's
GetCount()
method to see how many items are in it."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Hello David, Thanks for your valuable suggestions. Actually i have figure out a weird notion in VC++ 6.0, this default data items (from data tab of properties window of the combo-box control) works superbly well with Win32 wizard application but its not working with Win32 blank application, i am trying to figure it why ?????? but couldn't succeed till now....... If you kindly help me to sought out this issue, and please correct me if i am wrong in any sense. Your help will be greatly appreciated. Regards Sujay