473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

strange behavior in Windows COMBOBOX

18
I have a COMBOBOX of style CBS_DROPDOWN .. i.e. the edit area is supposed to be editable. [And indeed it is editable by interactive typing into it]

What I've noticed is that I can control the text shown in the edit area when I first create the COMBOBOX with SetWindowText (hwnd, "Hello There").

However, after the user has selected an item from the drop down list, I can no longer do SetWindowText() to control the displayed text ... it seems to have no effect.

Any ideas why this is so?

[Yes, I know I can add the text I want to display temporarily to the list of strings in the drop down list, then display it by selecting its index, then remove it from the list ... but I'm trying to avoid all that overhead]

Thanks
Apr 19 '10 #1
2 1798
YarrOfDoom
1,247 Expert 1GB
Have you tried clearing the current selection with CB_SETCURSEL?
Apr 19 '10 #2
dorito
18
If I clear the current selection with CB_SETCURSEL -1 ... it indeed clears the edit box, but then a SetWindowText() call has no effect.

Thx
Apr 22 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Steve | last post by:
I have an unbound combobox in the form header of a continuous form. The selection in the combobox sets the where clause in a querydef which determines QryPFrmInventoryManagement. The following code...
0
by: CalPARK InterNetStation | last post by:
Could anyone explain why the difference of behavior betweein Case1 and Case2 occurs? Microsoft Visual C#.NET 55607-652-0000007-18218 Windows Forms Application 1. put a TabControl on a Form...
1
by: qe_Cui | last post by:
Hello Everyone: I am using vb.net 2003 / SqlServer 2000 / Windows2000 Professional OS. I put a combobox in a form in my application, it works well in my own pc. But when I relase it to a...
1
by: Chris | last post by:
Hey, I have a DataGrid that allows for a combobox in a column through a inherited DataGridColumnStyle and a inherited ComboBox. I have 3 of these columns in a row. The overall problem is that...
1
by: Peter Proost | last post by:
Hi group I've got a usercontrol containing a textbox and alongside the textbox there's a combobox. I draw this control on top of a grid. So when the user clicks certain columns in the grid the...
0
by: Marc Robitaille | last post by:
Hello, I developed a UserControl. It has funny behavior. It is composed of three controls. A texbox, a combobox and a button. There are three properties to indicate the visibility of the three...
1
by: ucasesoftware | last post by:
I have a 2 tabpage : tapPage 1 : one combobox with a keydown event : Private Sub cbClients_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles...
2
by: Crazy Cat | last post by:
I am using a data-bound combobox with dropdownstyle set to dropdownlist. Teh combobox is bound to a bindingsource which is in turn bound to a table in my database. The table has only 4 rows and I...
8
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose...
0
by: Antonio Paglia | last post by:
Hi guys, I saw an strange behavior with some printers of series HP Laserjet 1000. I have installed several printers on my PC, some of them are : HP LaserJet 1020 e 1010. I'm using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.