Solved

combo box

Posted on 1998-09-18
2
206 Views
Last Modified: 2012-05-04
i use a combobox contril in a dialog form with constant values and i will prevent the user to write any value in combobox also just readable, what can i do.
0
Comment
Question by:saidi
2 Comments
 
LVL 2

Accepted Solution

by:
gysbert1 earned 50 total points
ID: 1173087
Change the Style Property from csDropDown to csDropDownList (in object inspector)

Easy as that !



// From the C++ builder help

Value                    Meaning

csDropDown      Creates a drop-down list with an edit box for manually entered text. All
                            items are strings of the same height.
csSimple                    Creates an edit box with a fixed list (list box) underneath. The length of
                            the list is determined by the Height of the combo box.
csDropDownList      Creates a drop-down list with no edit box; the user cannot enter text                            
                            manually. All items are strings of the same height.
csOwnerDrawFixedCreates an owner-draw drop-down list with an edit box for manually
                             entered text. Each item in the list is the height specified by the            
                             ItemHeight property.

csOwnerDrawVariable      Creates an owner-draw drop-down list with an edit box for manually entered text. List items can have varying heights.

0
 

Expert Comment

by:juerg
ID: 1173088
An easyer way
In resource click on your comboBox,
Click right button and then  properties
there goto Style and click Type: = Drop List
Thats all
Juerg
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now