Solved

combo box

Posted on 1998-09-18
2
209 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

726 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