CN102566991A - Method and device for displaying data in control - Google Patents

Method and device for displaying data in control Download PDF

Info

Publication number
CN102566991A
CN102566991A CN2010105937417A CN201010593741A CN102566991A CN 102566991 A CN102566991 A CN 102566991A CN 2010105937417 A CN2010105937417 A CN 2010105937417A CN 201010593741 A CN201010593741 A CN 201010593741A CN 102566991 A CN102566991 A CN 102566991A
Authority
CN
China
Prior art keywords
data
data length
viewing area
maximum
control
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
Application number
CN2010105937417A
Other languages
Chinese (zh)
Inventor
姜圣阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN2010105937417A priority Critical patent/CN102566991A/en
Publication of CN102566991A publication Critical patent/CN102566991A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a method for displaying data in a control. The embodiment of the invention further provides a corresponding device. In the embodiment of the invention, the device can obtain the data lengths of all the data input by a user in an interface corresponding to some control, and can get the maximum data length from the obtained data lengths and set the width of a display region of the control according to the maximum data length. In this way, all the data input by the user corresponding to some control can be completely displayed in the display region of the control.

Description

A kind of in control the method and apparatus of video data
Technical field
The present invention relates to technical field of data processing, be specifically related to a kind of in control the method and apparatus of video data.
Background technology
Along with popularizing of the personal computer and the Internet, with no paper network office has obtained increasing application, and various business can be accomplished through network office, like human resources business, order business etc.Each business all has corresponding interface, and the user can be the data input interface, and in the interface, shows these data through various controls.
In research and practice process to prior art; Inventor of the present invention finds; In the prior art, the width of the viewing area of control is provided with in advance, but user's data of typing in the interface are at random; If the data length of user's certain data of typing in the interface is bigger than the predetermined width of the viewing area of control, then can in the viewing area of control, show these data fully.
Summary of the invention
The embodiment of the invention provide a kind of in control the method and apparatus of video data.
A kind of in control the method for video data, comprising: obtain all data that need in the viewing area of control, show; Obtain the data length of each said data; From all said data lengths, obtain maximum data length; According to the data length of said maximum the width of said viewing area is set, in said viewing area, shows all said data.
A kind of in control the device of video data, comprising: obtain data cell, be used to obtain all data that need in the viewing area of control, show; Obtain the maximum data length cell, be used to obtain the data length of each said data, and from all said data lengths, obtain maximum data length; Width unit, viewing area is set, is used for being provided with the width of said viewing area according to the data length of said maximum; The video data unit is used in said viewing area, showing all said data.
Can find out from the above technical scheme that the embodiment of the invention provides; Because the embodiment of the invention can be obtained user's data length corresponding to all data of a certain control typing in the interface; And therefrom obtain maximum data length; According to the data length of maximum the width of the viewing area of this control is set, thereby has guaranteed in the viewing area that is presented at this control that user's all data corresponding and a certain control typing can both be complete.
Description of drawings
Fig. 1 be in the embodiment of the invention in control the schematic flow sheet of the method for video data embodiment;
Fig. 2 be in the embodiment of the invention in control the schematic flow sheet of another embodiment of the method for video data;
Fig. 3 be in the embodiment of the invention in control the logical organization synoptic diagram of the device of video data embodiment.
Embodiment
The embodiment of the invention provide a kind of in control the method for video data, the embodiment of the invention also provides corresponding device thereof.Below be elaborated respectively.
Embodiment one, see also Fig. 1, in the embodiment of the invention in control the method for video data embodiment, comprising:
101, obtain all data that need in the viewing area of control, show;
Usually; In system, the data input interface can be provided; The user can be in the logging data of data input interface; The data of these typings subsequently can be stored in the database, and the device of video data (being designated hereinafter simply as device) can obtain all data that show in the viewing area of control that need be in the interface in database in control.
102, obtain the data length of each data, and from all data lengths, obtain maximum data length;
Device can obtain the data length of each data that need in the viewing area of control, show, and from all data lengths, obtains maximum data length.
Need to prove, when device obtain need viewing area at control in data presented quantity when having only one, the data length of the maximum that device obtains is exactly the data length of these unique data.
103, the width of the viewing area of control is set according to the data length of maximum;
Get access to the maximal value of data length of all data that show in need viewing area when device after at control; Device can also be provided with the width of the viewing area of control according to this maximum data length; So, the width of the viewing area of the control data length of all data of in the viewing area of control, showing of just can satisfying the demand.
104, video data in the viewing area of control.
After the width of viewing area of control has been set when device, just can all data that need in the viewing area of control, show that from database, get access to be shown in the viewing area.
In the present embodiment; Device can obtain user's data length corresponding to all data of a certain control typing in the interface; And therefrom obtain maximum data length; According to the data length of maximum the width of the viewing area of this control is set, thereby has guaranteed in the viewing area that is presented at this control that user's all data corresponding and a certain control typing can both be complete.
In embodiment two, the embodiment of the invention in control another embodiment of the method for video data, comprising:
201, obtain all data that need in the viewing area of control, show;
This step is identical with step 101, repeats no more here.
202, obtain the data length of each data through the VB function, and from all data lengths, obtain maximum data length;
Device can adopt the VB function to obtain the data length of each data that need in the viewing area of control, show, device can obtain maximum data length from all data lengths subsequently.
Optional, device can adopt the data length of the LENB function calculation data in the VB function, and for example, the data of user's typing are industrial and commercial bank, and device can pass through to carry out: this instruction of LENB (" industrial and commercial bank "), come computational data length.
203, the data length with maximum converts pixel wide into, and the width of the viewing area of control is set according to pixel wide;
Because the linear module of data length is a byte; And the linear module that shows in the display is a pixel; Therefore device can adopt API (API; Application Programming Interface) function calculates earlier the corresponding pixel wide of data length with maximum, and the width value with the viewing area of control is the pixel wide corresponding with the data length of maximum then.
Optional, device can adopt the GetTextExtentPoint32 function calculation and the maximum corresponding pixel wide of data length in the api function.
204, video data in the viewing area of control.
This step is identical with step 104, repeats no more here.
In the present embodiment; Device can obtain user's data length corresponding to all data of a certain control typing in the interface through the VB function; And therefrom obtain maximum data length; Adopting api function to convert the data length of maximum into corresponding pixel wide then, be the pixel wide that obtains before this with the width value of the viewing area of this control, thereby has guaranteed in the viewing area that is presented at this control that user's all data corresponding and a certain control typing can both be complete.
For the ease of understanding, be described in detail with the method for a concrete application scenarios below video data in control, in embodiment three, the inventive embodiments in control another embodiment of the method for video data, detailed description as follows:
Device need show a series of data in the viewing area of drop-down control that corresponding to label is " subject "; User's column data under the data input interface typing of system at first: row high and new technology industrial development zone subbranch, city east subbranch of 1002.01.02 industrial and commercial bank, international trade subbranch of 1002.01.03 Construction Bank, Yan Nan subbranch of 1002.01.04 agricultural bank, 1002.01.05 China Merchants Bank Lianhua Shan Mountain subbranch, Shenzhen branch of Tokyo bank of union of 1002.01.06 Mitsubishi, the lucky subbranch of 1002.01.07 Huaxia Bank salt, snake mouth subbranch of 1002.02.01 Construction Bank among the 1002.01.01; These data can be stored in the database; Device gets access to above-mentioned data from database; Go out the data length of above-mentioned data then through the LENB function calculation in the VB function; Therefrom obtain maximum data length; In the present embodiment; Maximum data length is exactly the data length of data " Shenzhen branch of Tokyo bank of union of 1002.01.06 Mitsubishi "; GetTextExtentPoint32 function in the device employing api function converts the data length of data " Shenzhen branch of Tokyo bank of union of 1002.01.06 Mitsubishi " into corresponding pixel wide then; To be that the width value of viewing area of the drop-down control of " subject " is this pixel wide corresponding to label again, final unit be presented at above-mentioned all data integrities of user's typing in the viewing area of label for the drop-down control of " subject ".
Embodiment four, see also in Fig. 3 embodiment of the invention the device of video data embodiment in control, comprising:
Obtain data cell 301, be used to obtain all data that need in the viewing area of control, show;
Obtain maximum data length cell 302; Be used to obtain the data length of each data; And from all data lengths, obtain maximum data length, and optional, obtain the data length that maximum data length cell 302 is used to adopt each data of VB function calculation; Further, obtain the data length that maximum data length cell 302 is used for adopting each data of LENB function calculation of VB function.
Width unit, viewing area 303 is set; Be used for being provided with the width of viewing area according to the data length that obtains the maximum that maximum data length cell 302 obtains; Optional; Width unit, viewing area 303 is set is used to adopt api function to calculate and the corresponding pixel wide of data length of obtaining the maximum that maximum data length cell 302 obtains; Width value with the viewing area is this pixel wide again; Further, GetTextExtentPoint32 function calculation that width unit, viewing area 303 is used for adopting api function and the corresponding pixel wide of data length of obtaining the maximum that maximum data length cell 302 obtains are set, the width value with the viewing area is this pixel wide again.
Video data unit 304 is used in the viewing area that width unit, viewing area 303 has been provided with is set, showing all data.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description is to instruct relevant hardware to accomplish through program; This program can be stored in the computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
More than the method and the device of video data in control that the embodiment of the invention provided carried out detailed introduction; Used concrete example among this paper principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. the method for a video data in control is characterized in that, comprising:
Obtain all data that need in the viewing area of control, show;
Obtain the data length of each said data;
From all said data lengths, obtain maximum data length;
According to the data length of said maximum the width of said viewing area is set, in said viewing area, shows all said data.
2. method according to claim 1 is characterized in that,
According to the data length of said maximum the width of said viewing area is set, is specially:
Adopt the API api function to calculate the pixel wide corresponding with the data length of said maximum;
With the width value of said viewing area is said pixel wide.
3. method according to claim 2 is characterized in that,
Adopt api function to calculate the pixel wide corresponding, be specially with the data length of said maximum:
Adopt the GetTextExtentPoint32 function calculation pixel wide corresponding in the api function with the data length of said maximum.
4. according to each described method in the claim 1 to 3, it is characterized in that,
Obtain the data length of each said data, be specially: the data length that adopts each said data of VB function calculation.
5. method according to claim 4 is characterized in that,
Adopt the data length of each said data of VB function calculation, be specially:
Adopt the data length of each the said data of LENB function calculation in the VB function.
6. the device of a video data in control is characterized in that, comprising:
Obtain data cell, be used to obtain all data that need in the viewing area of control, show;
Obtain the maximum data length cell, be used to obtain the data length of each said data, and from all said data lengths, obtain maximum data length;
Width unit, viewing area is set, is used for being provided with the width of said viewing area according to the data length of said maximum;
The video data unit is used in said viewing area, showing all said data.
7. device according to claim 6 is characterized in that,
The said width unit, viewing area that is provided with also is used to adopt the API api function to calculate the pixel wide corresponding with the data length of said maximum; With the width value of said viewing area is said pixel wide.
8. device according to claim 7 is characterized in that,
Said the GetTextExtentPoint32 function calculation pixel wide corresponding with the data length of said maximum that width unit, viewing area also is used for adopting api function be set; With the width value of said viewing area is said pixel wide.
9. according to each described device in the claim 6 to 8, it is characterized in that,
Saidly obtain the data length that the maximum data length cell also is used to adopt each said data of VB function calculation.
10. device according to claim 9 is characterized in that,
Saidly obtain the data length that the maximum data length cell also is used for adopting each said data of LENB function calculation of VB function.
CN2010105937417A 2010-12-17 2010-12-17 Method and device for displaying data in control Pending CN102566991A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105937417A CN102566991A (en) 2010-12-17 2010-12-17 Method and device for displaying data in control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105937417A CN102566991A (en) 2010-12-17 2010-12-17 Method and device for displaying data in control

Publications (1)

Publication Number Publication Date
CN102566991A true CN102566991A (en) 2012-07-11

Family

ID=46412506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105937417A Pending CN102566991A (en) 2010-12-17 2010-12-17 Method and device for displaying data in control

Country Status (1)

Country Link
CN (1) CN102566991A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610926A (en) * 2015-10-27 2017-05-03 北京国双科技有限公司 Data display method and device for Echarts (Enterprise Charts)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0642076A1 (en) * 1993-08-26 1995-03-08 International Business Machines Corporation A data processing system
CN101065723A (en) * 2004-11-26 2007-10-31 菲利普·K·钦 Method of displaying data in a table

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0642076A1 (en) * 1993-08-26 1995-03-08 International Business Machines Corporation A data processing system
CN101065723A (en) * 2004-11-26 2007-10-31 菲利普·K·钦 Method of displaying data in a table

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
求是科技: "《Windows API程序设计参考大全》", 31 January 2006, 人民邮电出版社 *
王真富等: "《Visual Basic程序设计教程》", 31 January 2007, 地质出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610926A (en) * 2015-10-27 2017-05-03 北京国双科技有限公司 Data display method and device for Echarts (Enterprise Charts)

Similar Documents

Publication Publication Date Title
CN107861938B (en) POI (Point of interest) file generation method and device and electronic equipment
EP3329682B1 (en) A system for compositing video with interactive, dynamically rendered visual aids
CN105741334B (en) Thermodynamic chart providing method and device
CN104956303B (en) Volume control process
US20150293929A1 (en) Method and apparatus for processing webpage in terminal device by using cloud server
CN102708133B (en) Task-based address bar and tabs scaling
CN108235148B (en) Similar barrage merging method in live broadcast, storage medium, electronic device and system
US10489839B2 (en) Information presentation method and information presentation apparatus
KR20150067521A (en) Apparatus and method for scrren sharing, scrren sharing service system
CN104572084B (en) User interface generation and data distributing method, device in card business
CN110827061B (en) Method and equipment for providing presentation information in novel reading process
CN109845275A (en) The method and apparatus that defeated session control is supported are spread for visual field virtual reality
US10192359B2 (en) Subject selected augmented reality skin
CN112764612A (en) Interaction method, interaction device, electronic equipment and storage medium
CN114245028B (en) Image display method and device, electronic equipment and storage medium
US20180293610A1 (en) Methods and systems for integrating applications into a content recommendation network
CN107765773A (en) A kind of method, apparatus of display information, terminal and storage medium
KR20150131215A (en) 3d mobile and connected tv ad trafficking system
CN108228121A (en) A kind of method, device and mobile terminal of browser split screen
CN102497580B (en) Video information synthesizing method based on audio feature information
US9602576B2 (en) Control redistribution among multiple devices
CN114330277B (en) Reading typesetting method, device, equipment and storage medium
CN105893558B (en) Recommended data display method and system
CN102566991A (en) Method and device for displaying data in control
CN107562324A (en) The method and terminal of data display control

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120711