انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Listbox and Combobox

الكلية كلية تكنولوجيا المعلومات     القسم قسم شبكات المعلومات     المرحلة 1
أستاذ المادة انوار جعفر موسى جعفر       22/01/2013 09:52:52
Using ListBox and ComboBox Cono ols In Visual Basic 6:
The ListBox will display a single column of strings. referred to as items. The items to appear initially
can either be specified at design tirne with the List property or set with code in the Form_Load event
procedure. Then code is used to access. add. or delete items from the list. If the number of items
exceed the value that be displayed. scroll bars will automatically appear on the control. These scroll
bars can be scrolled up and down or left to right through the list.
A ComboBox is best through of as a text box with a help list attached, With an ordinary textbox. the
user must type information into the box. With a combobox, the uaer has the option of either typing in
information 01 just selecting the appropriate piece of information from a list, The two most useful
types of combobox are denoted as style property combobox as shown in F igure below .
... Form1 ~[QJL8J
.~-1
ICombo2
With a style 1 combo box. the list is always visible. With style 0 or 2 combo box. the list drops down
when the user clicks on the arrow. In either case. when an item from the list is highlighted, the item
automatically appears in the text box at the top and its value is assigned to tbe text property of the
combo box. The items to appear initially can either be specified at design rime with the combo
property or set with combo_changeO event procedure directly.
Cornbo Box es have essentially the same properties. event and methods as ListBoxes.
-
The following Eigure lists some of the common ListBox &ComboBox properties and methods.
I
Property
IPropel·ties
I
Description
IEnabled
By setting this property to True or False user can decide whether user
can interact with this control or not
IList
String array. Contains rhe strings displayed in the drop-down list.
Starting array index is O. Use CTRL+Enter to insert values.
ISorted
Boolean. Specifies whether the ListBox &ComboBox items are sorted
or not.
IStYle
Integer. Specifies the sryle of the ListBox &ComboBox appearance
IText
Strfng . Specifies the selected item in the ComboBox.
IVisible
Boolean. Specifies whether ListBox &ColnboBox is visible or not at r un
time
IEvent Pz-oce duj-es
College of computer technology
Information network department
Programming with Visual Basic
===================================================
IChange
ICalled when text in ComboBox is changed
IClick
ICalled when the ListBox &ComboBox is clicked

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .