CN107526586A - By drop-down list can multiselect option self-control user control generation method - Google Patents
By drop-down list can multiselect option self-control user control generation method Download PDFInfo
- Publication number
- CN107526586A CN107526586A CN201710643422.4A CN201710643422A CN107526586A CN 107526586 A CN107526586 A CN 107526586A CN 201710643422 A CN201710643422 A CN 201710643422A CN 107526586 A CN107526586 A CN 107526586A
- Authority
- CN
- China
- Prior art keywords
- option
- drop
- user control
- control
- generation method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Digital Computer Display Output (AREA)
Abstract
The present invention provide it is a kind of by drop-down list can multiselect option self-control user control generation method, comprise the following steps:Step 1:Make the display interface of user control;Step 2:Add the Value attributes, StrValue attributes and ItemsHeight attributes of the user control;Step 3:Increase CValueChange events, for external call;Step 4:The function of increase loading option content and display selection content.The present invention has the advantages of design science, practical, intuitive and convenient.
Description
Technical field
The present invention relates to it is a kind of by drop-down list can multiselect option self-control user control generation method.
Background technology
The demand of multiselect option is had in many applications, if directly shown with the control carried, then can take big
The interface shape of amount, and need individually to calculate the sequence number of selection option after selecting, for example be used in generator set controller
, it is necessary to select maintenance time when safeguarding, maintenance time is often multiselect, such as to select to carry out on every Mondays, on every Wendesdays, on every Sundays
Safeguard, or selection No. 1, No. 15, No. 30 is safeguarded, at this moment just need to carry out multinomial selection, and by the option of selection
Sequence number is calculated as a numerical value and is written in controller, so that controller is calculated.At this moment a user control is made by oneself to have come
It is into above demand, i.e., simple and convenient and attractive in appearance.
In order to solve the problem present on, people are seeking a kind of preferable technical solution always.
The content of the invention
The purpose of the present invention is in view of the shortcomings of the prior art, so as to provide a kind of design science, practical, directly perceived
Easily by drop-down list can multiselect option self-control user control generation method.
To achieve these goals, the technical solution adopted in the present invention is:One kind can multiselect option by drop-down list
Self-control user control generation method, comprise the following steps:
Step 1:Make the display interface of user control;
Step 2:Add the Value attributes, StrValue attributes and ItemsHeight attributes of the user control;
Step 3:Increase CValueChange events, for external call;
Step 4:The function of increase loading option content and display selection content.
Based on above-mentioned, in step 1, a newly-built user control simultaneously sets user control name, and addition one is used to show
The TextBox controls of the content of option, a CheckedListBox drop-down option frame for being used for all display option contents
And one be used for control the display of the CheckedListBox drop-down options frame and hiding PictureBox controls.
Based on above-mentioned, in step 2, addition one is used to setting and obtaining the Value attributes of the value of the user control, one
The individual StrValue attributes for being used to return to the content of option and one are used to set the CheckedListBox to pull down
The ItemsHeight attributes of the height of Option Box;The height of the CheckedListBox drop-down options frame is to show option
Number, the option not shown are shown by scroll bar.
Based on above-mentioned, the calculating process of the value of the user control is:The sequence number of all options is entered from small to large
Row arrangement, using the sequence number of option as all numerical value 1 in binary data corresponding to power sequence number, and by the binary system
Data conversion is into decimal format.
Based on above-mentioned, in step 3, the event type of the CValueChange events is System.EventHandler,
The CValueChange events are triggered when the Value values of the user control change.
Based on above-mentioned, in step 4, the method for loading option content is:One choosing is once added by AddItem methods
.
Based on above-mentioned, in step 4, the method for loading option content is:Institute is once added by AddRangeItem methods
There is option content.
Based on above-mentioned, in step 4, choose the PictureBox controls, the PictureBox controls change automatically from
Body picture protrusion is counter to select effect;Click on the PictureBox controls, the CheckedListBox controls show for
Family is selected, and the content of all options is shown in the TextBox controls after selection terminates, with funny between adjacent option
Number separate.
The present invention is compared with the prior art with prominent substantive distinguishing features and significantly progressive, specifically, of the invention logical
Self-control user's control is crossed, and the attribute of user control is set, it is possible to achieve the function of multiselect is carried out in combobox, there is design
The advantages of science, practical, intuitive and convenient.
Brief description of the drawings
Fig. 1 is one embodiment of the present of invention.
Embodiment
Below by embodiment, technical scheme is described in further detail.
It is a kind of by drop-down list can multiselect option self-control user control generation method, comprise the following steps:
Step 1:Make the display interface of user control;
Step 2:Add the Value attributes, StrValue attributes and ItemsHeight attributes of the user control;
Step 3:Increase CValueChange events, for external call;
Step 4:The function of increase loading option content and display selection content.
The event type of the CValueChange events is System.EventHandler, when the user control
Value values trigger the CValueChange events when changing.Can be with self-defined work(in the CValueChange event functions
Can, such as sequence number, the title for the option that acquisition has just selected.
Specifically, as shown in figure 1, in step 1, a newly-built user control simultaneously sets user control name, adds a use
Under TextBox controls, the CheckedListBox for all display option contents in the content of display option
Option Box and one is drawn to be used to control the display of the CheckedListBox drop-down options frame and hiding PictureBox
Control, the right-hand member pair of control, the PictureBox controls and the TextBox controls is shown based on the TextBox controls
Together, the CheckedListBox drop-down options frame is placed on the underface of the TextBox controls, its width and described
TextBox controls are consistent.
Specifically, in step 2, addition one be used to setting and obtain the Value attributes of the value of the user control, one
It is used to set the CheckedListBox drop-downs choosing for the StrValue attributes of the content of return option and one
The ItemsHeight attributes of the height of item frame;The height of the CheckedListBox drop-down options frame is to show of option
Number, the option not shown are shown by scroll bar.
Specifically, the calculating process of the value of the user control is:The sequence number of all options is carried out from small to large
Arrangement, using the sequence number of option as all numerical value 1 in binary data corresponding to power sequence number, and by the binary number
According to being converted into decimal format.Such as chosen serial number 1,3,5, then enter equivalent to binary one 01010, i.e., ten
The 42 of system.
Specifically, in step 4, an option can be once added by AddItem methods when loading option content, also may be used
Once to add total Options content by AddRangeItem methods.
Specifically, in step 4, the PictureBox controls are chosen, the PictureBox controls change itself automatically
Picture selects effect so that protrusion is counter;The PictureBox controls are clicked on, the CheckedListBox controls can show confession
User is selected, and the content of all options can be shown in the TextBox controls after selection terminates, between adjacent option
Separated with comma.
Finally it should be noted that:The above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof;To the greatest extent
The present invention is described in detail with reference to preferred embodiments for pipe, those of ordinary skills in the art should understand that:Still
The embodiment of the present invention can be modified or equivalent substitution is carried out to some technical characteristics;Without departing from this hair
The spirit of bright technical scheme, it all should cover among the claimed technical scheme scope of the present invention.
Claims (8)
1. it is a kind of by drop-down list can multiselect option self-control user control generation method, it is characterised in that:Including following
Step:
Step 1:Make the display interface of user control;
Step 2:Add the Value attributes, StrValue attributes and ItemsHeight attributes of the user control;
Step 3:Increase CValueChange events, for external call;
Step 4:The function of increase loading option content and display selection content.
2. it is according to claim 1 by drop-down list can multiselect option self-control user control generation method, it is special
Sign is:In step 1, a newly-built user control simultaneously sets user control name, and addition one is used to show the interior of option
The TextBox controls of appearance, a CheckedListBox drop-down options frame and a use for being used for all display option contents
In the display and hiding PictureBox controls that control the CheckedListBox drop-down options frame.
3. it is according to claim 2 by drop-down list can multiselect option self-control user control generation method, it is special
Sign is:In step 2, addition one be used for set and obtain the user control value Value attributes, one be used for return
The StrValue attributes of the content of option and a height for being used to set the CheckedListBox drop-down options frame
The ItemsHeight attributes of degree;The height of the CheckedListBox drop-down options frame is to show the number of option, is not shown
Option out is shown by scroll bar.
4. it is according to claim 3 by drop-down list can multiselect option self-control user control generation method, it is special
Sign is:The calculating process of the value of the user control is:The sequence number of all options is arranged from small to large, by
Power sequence number of the sequence number of option corresponding to as all numerical value 1 in binary data, and the binary data is converted into
Decimal format.
5. it is according to claim 4 by drop-down list can multiselect option self-control user control generation method, it is special
Sign is:In step 3, the event type of the CValueChange events is System.EventHandler, as the user
The Value values of control trigger the CValueChange events when changing.
6. it is according to claim 5 by drop-down list can multiselect option self-control user control generation method, it is special
Sign is, in step 4, the method for loading option content is:One option is once added by AddItem methods.
7. it is according to claim 5 by drop-down list can multiselect option self-control user control generation method, it is special
Sign is, in step 4, the method for loading option content is:Total Options content is once added by AddRangeItem methods.
8. according to claim 6 or 7 by drop-down list can multiselect option self-control user control generation method, its
It is characterised by, in step 4, chooses the PictureBox controls, the PictureBox controls change itself picture and dashed forward automatically
Go out counter to select effect;The PictureBox controls are clicked on, the CheckedListBox controls are shown to be selected for user
Select, the content of all options is shown in the TextBox controls after selection terminates, and is separated between adjacent option with comma.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710643422.4A CN107526586A (en) | 2017-07-31 | 2017-07-31 | By drop-down list can multiselect option self-control user control generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710643422.4A CN107526586A (en) | 2017-07-31 | 2017-07-31 | By drop-down list can multiselect option self-control user control generation method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107526586A true CN107526586A (en) | 2017-12-29 |
Family
ID=60680466
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710643422.4A Pending CN107526586A (en) | 2017-07-31 | 2017-07-31 | By drop-down list can multiselect option self-control user control generation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107526586A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111596989A (en) * | 2020-04-28 | 2020-08-28 | 西安震有信通科技有限公司 | Histogram display method, terminal and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103885943A (en) * | 2012-12-19 | 2014-06-25 | 北大方正集团有限公司 | Method for achieving drop-down list box control in webpage |
CN104965642A (en) * | 2014-05-23 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and apparatus for generating a drop-down list |
CN105227634A (en) * | 2015-08-31 | 2016-01-06 | 徐州工程学院 | A kind of compression of the binary data based on Residential soil and encryption method |
CN106325880A (en) * | 2016-08-31 | 2017-01-11 | 郑州众智科技股份有限公司 | Self-made user controls generation method for displaying WIFI information based on VB |
-
2017
- 2017-07-31 CN CN201710643422.4A patent/CN107526586A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103885943A (en) * | 2012-12-19 | 2014-06-25 | 北大方正集团有限公司 | Method for achieving drop-down list box control in webpage |
CN104965642A (en) * | 2014-05-23 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and apparatus for generating a drop-down list |
CN105227634A (en) * | 2015-08-31 | 2016-01-06 | 徐州工程学院 | A kind of compression of the binary data based on Residential soil and encryption method |
CN106325880A (en) * | 2016-08-31 | 2017-01-11 | 郑州众智科技股份有限公司 | Self-made user controls generation method for displaying WIFI information based on VB |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111596989A (en) * | 2020-04-28 | 2020-08-28 | 西安震有信通科技有限公司 | Histogram display method, terminal and storage medium |
CN111596989B (en) * | 2020-04-28 | 2024-03-29 | 西安震有信通科技有限公司 | Histogram display method, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10013145B2 (en) | Terminal device and method for designing network application product | |
CN103885943B (en) | The implementation method of drop-down list box control in webpage | |
JP2015076033A5 (en) | User information input device, input screen display method, and input screen display program | |
CN103870092A (en) | Desktop icon display method and electronic device | |
CN105981020A (en) | Assistance with setting clinical alarm limits | |
WO2022199470A1 (en) | Dynamic wallpaper acquisition method and device | |
CN103019766A (en) | Android equipment-based dynamic wallpaper arrangement method, android equipment-based dynamic wallpaper arrangement device and terminal | |
CN104571823A (en) | Non-contact virtual human-computer interaction method based on smart television set | |
CN103064592B (en) | A kind of prolongable menu display method | |
CN102354283A (en) | Method for constructing rule base and method for checking data by utilizing rule base | |
CN107526586A (en) | By drop-down list can multiselect option self-control user control generation method | |
RU121945U1 (en) | INTERFACE SYSTEM FOR WORKING WITH SEARCH SYSTEMS AND DATABASES | |
JP2013246682A5 (en) | ||
Giudici et al. | Leafy: Enhancing home energy efficiency through gamified experience with a conversational smart mirror | |
KR20180000852A (en) | Plant cultivation system using transparent display apparatus, control method thereof and recording medium for performing the method | |
CN207400595U (en) | Bathroom mirror and its gesture control device | |
CN108829390B (en) | Software main interface framework design method | |
CN109062646A (en) | A kind of electronic equipment console and its working method and electronic equipment | |
CN108536494A (en) | Program assembly method for sorting and system applied to mobile terminal | |
CN107329718A (en) | A kind of control process method and terminal to terminal | |
CN102789379A (en) | Method and device for constructing user interface | |
CN105476832A (en) | Mobile terminal as well as weight losing method and device using mobile terminal | |
CN108776588A (en) | A kind of optimization algorithm thumbing up effect | |
CN106325880A (en) | Self-made user controls generation method for displaying WIFI information based on VB | |
CN105677355B (en) | Address list tissue and member data show exchange method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171229 |
|
RJ01 | Rejection of invention patent application after publication |