Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Lists-based controls in FlexBuilder2.0

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to use Lists-based controls in FlexBuilder2.0. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Using Lists-based controls in FlexBuilder2.0

You can use Lists-based controls in your Flex applications, such as ComboBox, List, HorizontalList. After inserting this control, you must display the items in it, and its value is used for submission processing. In FlexBuilder2.0, the values of these controls are placed in the data provider (data providers), which is a set of objects similar to arrays. This speed learning tutorial teaches you how to display items in Lists-based controls and their values in FlexBuilder2.0.

Before we begin

Before you start this speed tutorial, make sure you complete the following tasks:

◆ creates a QuickStart project in FlexBuilder2.0.

◆ opens the Project menu in FlexBuilder2.0 to confirm that the Build Automatically option is selected, as follows:

Insert and place controls

In this section, you will create a simple form.

1. Open the QuickStart project, select File > New > MXML Application, and enter ListControl.mxml in File Name.

two。 Right-click the ListControl.mxml file in the Navigator view and select Application Management > Set As Default Application to specify it as the default compiled file.

3. In Design view, drag and drop the following controls from the components panel (Window > Show View > Components) into the Canvas container:

◆ Label

◆ ComboBox

◆ Button

4. In the Canvas container, select the Label control and set the properties of Label as follows:

◆ text: Rate customer service

◆ x: 20

◆ y: 50

5. In the Canvas container, select the ComboBox control and set the properties of ComboBox as follows:

◆ id: cbxRating

◆ x: 20

◆ y: 80

There are no items in the ComboBox component, you will put the items later

6. In the Canvas container, select the Button control and set the properties of Button as follows:

◆ label: Send

◆ x: 140

◆ y: 80

7. Click the Code button on the sidebar to change the view to code view. The ListControl.mxml file will include the following MXML code:

Program code:

8. Save the file, wait for FlexBuilder2.0 until the application is compiled, and then click the Run button on the toolbar.

The browser automatically opens and runs your Flex application.

9. Click ComboBox.

There are no items in the ComboBox component because you haven't defined its data provider yet.

This is the end of this article on "how to use Lists-based controls in FlexBuilder2.0". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report