CN104636038B - A kind of system and method for painting slider bar certainly - Google Patents
A kind of system and method for painting slider bar certainly Download PDFInfo
- Publication number
- CN104636038B CN104636038B CN201510043085.6A CN201510043085A CN104636038B CN 104636038 B CN104636038 B CN 104636038B CN 201510043085 A CN201510043085 A CN 201510043085A CN 104636038 B CN104636038 B CN 104636038B
- Authority
- CN
- China
- Prior art keywords
- slider bar
- slider
- sliding block
- background
- 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.)
- Expired - Fee Related
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The present invention relates to a kind of from the method for painting slider bar, comprise the following steps:Step S1. adds slider control, obtains slider bar background information;Step S2. initializes slider control;Step S3. obtains the wide and high of slider control, draws the Background of slider bar;Step S4. sets the sliding scale of slider bar, draws the distance of each moved further of sliding block;Step S5. clicks on the optional position of slider bar, obtains the coordinate at click, and the step number that sliding block should move, fast positioning are drawn in the distance of each step slip of distance and sliding block of coordinate of the starting point to click at of slider bar according to sliding block;The position that sliding block is moved at click by step S6., then update the background and sliding block of slider control;Step S7. removes background information, unloads slider control, obtains slider bar.Compared with the prior art, the present invention can realize that background is redrawn, and energy is quick, accurate movement to the position currently clicked on, and transplanting workload is small, reusability is high.
Description
Technical field
The present invention relates to a kind of from the system and method for painting slider bar.
Background technology
The present invention solves MFC and carries slider bar can not to redraw background and can not the position clicked on to mouse of accurate movement.Mesh
Solved in preceding industry using the form of textures, do not form a general module, another work is transplanted to from an engineering
The workload that journey need to be spent is very big, and reusability is very low.
The content of the invention
The technical problems to be solved by the invention, which are to provide one kind, can realize that background is redrawn, and transplanting workload is small, reusability
The high system and method for painting slider bar certainly.
The technical scheme that the present invention solves above-mentioned technical problem is as follows:A kind of method for painting slider bar certainly, including following step
Suddenly:
Step S1. adds slider control, obtains slider bar background information;
Step S2. initializes slider control according to slider bar background information;
Step S3. obtains the wide and high of slider control, is drawn and slided according to the width, height and background information of slider control
The Background of bar;
Step S4. sets the sliding scale of slider bar, draws the distance of each moved further of sliding block;
Step S5. click on slider bar optional position, obtain click at coordinate, according to sliding block slider bar starting point
The distance that each step of distance and sliding block of coordinate at click is slided draws the step number that sliding block should move, fast positioning;
Sliding block is moved at click by the step number and its distance of each moved further that step S6. should be moved by sliding block
Position, then update the background and sliding block of slider control;
Step S7. removes background information, unloads slider control, obtains slider bar.
The beneficial effects of the invention are as follows:According to the width of slider bar and the high Background for drawing slider control, it is easy to repeat
The Background of slider control is drawn, reusability of the present invention is high, and simply, repetition drafting slider control is quick, is easy to transplant,
And transplanting workload is small;The distance for the coordinate being moved to according to sliding block in the starting point of slider bar at click show that sliding block should move
Dynamic step number, it is easy to quick, coordinate of the accurate movement at click, operational efficiency height.
On the basis of above-mentioned technical proposal, the present invention can also do following improvement.
Further, the step S1 also includes:It is to paint certainly to set slider control attribute.
Further, the slider bar background information is Background.
Another technical scheme that the present invention solves above-mentioned technical problem is as follows:
A kind of system for painting slider bar certainly, including load-on module, data obtaining module, control module, computing module, position
Acquisition module, update module and Unload module are set;
The load-on module, it is used to add slider control;
Described information acquisition module, it is used to obtain slider bar background information;Be additionally operable to obtain slider control width and
It is high;
The control module, it is used to initialize slider control according to slider bar background information;It is additionally operable to according to slip
Width, height and the background information of bar control draw the Background of slider bar;It is additionally operable to move the position of sliding block, the cunning of slider bar is set
Dynamic scope;
The computing module, for every in the distance and sliding block of coordinate of the starting point at click of slider bar according to sliding block
The distance that one step is slided draws the step number that sliding block should move;
The position acquisition module, it is used for the optional position for clicking on slider bar, obtains the coordinate at click;
The setting update module, it is used for the step number that should be moved by sliding block and its distance of each moved further will be sliding
The position that block is moved at click, then update the background and sliding block of slider control;
The Unload module, it is used to remove background information, unloads slider control.
The beneficial effects of the invention are as follows:Data obtaining module can be obtained from the information for painting slider control, control module control
Slider control background processed is redrawn, and the distance that can be slided according to the coordinate at the click of position acquisition module and each step of sliding block
The step number that sliding block should move is drawn, quick, coordinate of the accurate movement at click, operational efficiency is high, multiple module operations, energy
Automatically realize from slider control is painted, paint process workload very little certainly, system reusability is very high.
Further, described information acquisition module includes information acquisition unit and detection unit, and described information acquiring unit is used
In by interface from outside obtain slider bar background information;The detection unit is used to detect the wide and high of slider control.
Further, it is to paint certainly that the control module, which is additionally operable to set slider control attribute,.
Further, the slider bar that the control module is provided by rewriteeing DrawItem functions and data obtaining module
Wide, high and background information realizes that slider bar background is drawn.
Brief description of the drawings
Fig. 1 is that the present invention is a kind of from the method flow diagram for painting slider bar;
Fig. 2 is that the present invention is a kind of from the system module block diagram for painting slider bar;
Fig. 3 is the module frame chart of data obtaining module.
In accompanying drawing, the list of parts representated by each label is as follows:
1st, load-on module, 2, data obtaining module, 21, information acquisition unit, 22, detection unit;
3rd, control module, 4, computing module, 5, position acquisition module, 6, update module is set, 7, Unload module.
Embodiment
The principle and feature of the present invention are described below in conjunction with accompanying drawing, the given examples are served only to explain the present invention, and
It is non-to be used to limit the scope of the present invention.
As shown in figure 1, it is a kind of from the method for painting slider bar, comprise the following steps:
Step S1. adds slider control, obtains slider bar background information;
Step S2. initializes slider control according to slider bar background information;
Step S3. obtains the wide and high of slider control, is drawn and slided according to the width, height and background information of slider control
The Background of bar;
Step S4. sets the sliding scale of slider bar, draws the distance of each moved further of sliding block;
Step S5. click on slider bar optional position, obtain click at coordinate, according to sliding block slider bar starting point
The distance that each step of distance and sliding block of coordinate at click is slided draws the step number that sliding block should move, fast positioning;
Sliding block is moved at click by the step number and its distance of each moved further that step S6. should be moved by sliding block
Position, then update the background and sliding block of slider control;
Step S7. removes background information, unloads slider control, obtains slider bar.
It is to paint certainly to set slider control attribute.
The slider bar background information is Background.
As shown in Figures 2 and 3, it is a kind of from the system for painting slider bar, including load-on module 1, data obtaining module 2, control
Module 3, computing module 4, position acquisition module 5, setting update module 6 and Unload module 7;
The load-on module 1, it is used to add slider control;
Described information acquisition module 2, it is used to obtain slider bar background information;Be additionally operable to obtain slider control width and
It is high;
The control module 3, it is used to initialize slider control according to slider bar background information;It is additionally operable to according to slip
Width, height and the background information of bar control draw the Background of slider bar;It is additionally operable to move the position of sliding block, the cunning of slider bar is set
Dynamic scope;
The computing module 4, for according to sliding block coordinate of the starting point at click of slider bar distance and sliding block
The distance that each step is slided draws the step number that sliding block should move;
The position acquisition module 5, it is used for the optional position for clicking on slider bar, obtains the coordinate at click;
The setting update module 6, it is used for the step number that should be moved by sliding block and its distance of each moved further will
The position that sliding block is moved at click, then update the background and sliding block of slider control;
The Unload module 7, it is used to remove background information, unloads slider control.
Described information acquisition module 2 includes information acquisition unit 21 and detection unit 22, and described information acquiring unit 21 is used
In by interface from outside obtain slider bar background information;The detection unit 22 is used to detect the wide and high of slider control.
It is to paint certainly that the control module 3, which is additionally operable to set slider control attribute,.
Width, the Gao He for the slider bar that the control module 3 is provided by rewriteeing DrawItem functions and data obtaining module 2
Background information realizes that slider bar background is drawn.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.
Claims (5)
- It is 1. a kind of from the method for painting slider bar, it is characterised in that to comprise the following steps:Step S1. adds slider control, obtains slider bar background information, and the slider bar background is obtained from outside by interface Information, the slider bar background information are Background;Step S2. initializes slider control according to slider bar background information;Step S3. obtains the wide and high of slider control, and slider bar is drawn according to the width, height and background information of slider control Background:Width, height and background information by rewriteeing DrawItem functions and slider bar realize that slider bar background is drawn;Step S4. sets the sliding scale of slider bar, draws the distance of each moved further of sliding block;Step S5. click on slider bar optional position, obtain click at coordinate, according to sliding block slider bar starting point-to-point The distance that each step of distance and sliding block of the coordinate at the place of hitting is slided draws the step number that sliding block should move, fast positioning;The step number that step S6. should be moved by sliding block and its position that sliding block is moved at click by the distance of each moved further Put, then update the background and sliding block of slider control;Step S7. removes background information, unloads slider control, obtains slider bar.
- It is 2. a kind of from the method for painting slider bar according to claim 1, it is characterised in that the step S1 also includes:Set Slider control attribute is to paint certainly.
- It is 3. a kind of from the system for painting slider bar, it is characterised in that:Including load-on module (1), data obtaining module (2), control mould Block (3), computing module (4), position acquisition module (5), update module (6) and Unload module (7) are set;The load-on module (1), it is used to add slider control;Described information acquisition module (2), it is used to obtain slider bar background information, and the slider bar is obtained from outside by interface Background information, the slider bar background information are Background;It is additionally operable to obtain the wide and high of slider control;The control module (3), it is used to initialize slider control according to slider bar background information;It is additionally operable to according to slider bar Width, height and the background information of control draw the Background of slider bar:Carried by rewriteeing DrawItem functions and data obtaining module Width, height and the background information of the slider bar of confession realize that slider bar background is drawn;It is additionally operable to set the sliding scale of slider bar;The computing module (4), for every in the distance and sliding block of coordinate of the starting point at click of slider bar according to sliding block The distance that one step is slided draws the step number that sliding block should move;The position acquisition module (5), it is used for the optional position for clicking on slider bar, obtains the coordinate at click;The setting update module (6), it is used for the step number that should be moved by sliding block and its distance of each moved further will be sliding The position that block is moved at click, then update the background and sliding block of slider control;The Unload module (7), it is used to remove background information, unloads slider control.
- It is 4. a kind of from the system for painting slider bar according to claim 3, it is characterised in that described information acquisition module (2) wraps Information acquisition unit (21) and detection unit (22) are included, described information acquiring unit (21), which is used to obtain from outside by interface, to be slided Dynamic bar background information;The detection unit (22) is used to detect the wide and high of slider control.
- It is 5. a kind of from the system for painting slider bar according to claim 3, it is characterised in that the control module (3) is additionally operable to It is to paint certainly to set slider control attribute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510043085.6A CN104636038B (en) | 2015-01-28 | 2015-01-28 | A kind of system and method for painting slider bar certainly |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510043085.6A CN104636038B (en) | 2015-01-28 | 2015-01-28 | A kind of system and method for painting slider bar certainly |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104636038A CN104636038A (en) | 2015-05-20 |
CN104636038B true CN104636038B (en) | 2018-03-09 |
Family
ID=53214857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510043085.6A Expired - Fee Related CN104636038B (en) | 2015-01-28 | 2015-01-28 | A kind of system and method for painting slider bar certainly |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104636038B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105242927B (en) * | 2015-10-09 | 2019-04-30 | 沈文策 | A method of it can slidably be clicked based on realizing to switch under complex environment |
CN106445356A (en) * | 2016-08-26 | 2017-02-22 | 乐视控股(北京)有限公司 | Method and device for switching processing of scroll bar position in browser |
CN111596853B (en) * | 2020-04-29 | 2021-09-07 | 五八有限公司 | Method and device for realizing rolling indicator, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012813A (en) * | 2010-11-24 | 2011-04-13 | 康佳集团股份有限公司 | Implementation method for control of slider |
CN103631484A (en) * | 2012-08-24 | 2014-03-12 | 中兴通讯股份有限公司 | Interface control position adjusting method, device and terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847079A (en) * | 2010-04-30 | 2010-09-29 | 中兴通讯股份有限公司 | Method and device for regulating control button layout |
-
2015
- 2015-01-28 CN CN201510043085.6A patent/CN104636038B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012813A (en) * | 2010-11-24 | 2011-04-13 | 康佳集团股份有限公司 | Implementation method for control of slider |
CN103631484A (en) * | 2012-08-24 | 2014-03-12 | 中兴通讯股份有限公司 | Interface control position adjusting method, device and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN104636038A (en) | 2015-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104636038B (en) | A kind of system and method for painting slider bar certainly | |
CN104572783A (en) | Webpage click condition displaying method and device | |
CN103744935B (en) | A kind of quick mass data clustering processing method of computer | |
US10867251B2 (en) | Estimation results display system, estimation results display method, and estimation results display program | |
CN105182906B (en) | Position And Velocity control method based on high-order S type movement locus | |
CN102693281B (en) | AUTOCAD-based method for generating auxiliary line in PDMS | |
US20150178963A1 (en) | Graphical analysis system and graphical analysis method | |
CN103578553A (en) | Quick vector linetype erasing method | |
CN103324681B (en) | Process chart data creation method based on CAD | |
CN101882175B (en) | Computer graphics method for manufacturing centrifugal rating plate | |
CN102509314A (en) | Quick generating method for sunlight greenhouse construction drawing | |
CN104268118A (en) | Mathematical formula calculator including touch screen and method for identifying mathematical formulas | |
CN113419233A (en) | Method, device and equipment for testing perception effect | |
EP3211569A1 (en) | Estimation results display system, estimation results display method, and estimation results display program | |
CN107038199A (en) | A kind of drawing practice and device | |
CN116292538B (en) | Hydro-cylinder binding method, system, device and medium based on digital twin | |
CN104572778A (en) | Inquiry and statistics method for service database | |
CN102680012B (en) | System and method for automatic output of measuring information | |
RU2013151462A (en) | GESTURE OR EQUIPMENT MANAGEMENT | |
CN104182797A (en) | Automatic selection method of product part number on the basis of image recognition technology | |
CN107451628A (en) | The method of production information and the system with this method are traced by Quick Response Code | |
CN110675470A (en) | Contour line drawing method and device, computing equipment and readable storage medium | |
CN101872467B (en) | Special scale computer drawing method for scutcheon | |
CN107976176A (en) | Unmanned Aerial Vehicle Data processing method and processing device | |
CN106910394B (en) | Dynamic geometric multi-coordinate system implementation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180309 Termination date: 20220128 |