[summary of the invention]
Based on this, it is necessary to provide the method for displaying textbox of a kind of content of text input efficiency that can improve text box.
A kind of method for displaying textbox, comprises the following steps:
Monitor whether text box obtains focus;
When described text box obtains focus, in described text box, display needs the immobilized substance comprised in input content,
And by the need editor position in cursor positioning to described immobilized substance.
Wherein in an embodiment, described need edit bit to be set to described need input content to need edit field relative to institute
State the position of immobilized substance.
Wherein in an embodiment, when described text box obtains focus, it is judged that whether described text box remains with
Input content, the most then show on described once input content in described text box, and by cursor positioning on described
Input content end, if it is not, then in described text box, display needs the immobilized substance comprised in input content, and by cursor
Navigate to the need editor position in described immobilized substance.
Wherein in an embodiment, described method also includes:
When described text box does not obtains focus, in described text box, show default input prompt information.
Wherein in an embodiment, described input prompt information includes described immobilized substance and described needs edit field
Description information.
Additionally, there is a need to provide the text box display device of a kind of content of text input efficiency that can improve text box.
A kind of text box display device, including:
Focus monitors module, is used for monitoring whether text box obtains focus;
Display module, for when described text box obtains focus, in described text box, display needs to wrap in input content
The immobilized substance contained;
Cursor positioning module, after in described text box, display needs the immobilized substance comprised in input content, will
Cursor positioning is to the need editor position in described immobilized substance.
Wherein in an embodiment, described need edit bit to be set to described need input content to need edit field relative to institute
State the position of immobilized substance.
Wherein in an embodiment, described device also includes:
Judge module, for when described text box obtains focus, it is judged that whether described text box remains with last defeated
Enter content;
If described display module remains with last input content for described text box, then show in described text box
Described last input content, if described text box does not retains last input content, then showing in described text box need to be defeated
Enter the immobilized substance comprised in content;
After described cursor positioning module is used for showing in described text box on described once input content, light is demarcated
Position to described last input content end, and in described text box display need the immobilized substance that comprises in input content it
After, by the need editor position in cursor positioning to described immobilized substance.
Wherein in an embodiment, described display module is additionally operable to when described text box does not obtains focus, described
The input prompt information that in text box, display is preset.
Wherein in an embodiment, described input prompt information includes described immobilized substance and described needs edit field
Description information.
Above-mentioned text display method and device, when text box obtain focus time, show in text box in text box need defeated
Enter the immobilized substance comprised in content, and edit position by cursor positioning to immobilized substance needs, on the one hand, user does not input weight
Inputting some immobilized substance again, thus save input time, on the other hand, user can be directly in need to editing position input
Holding, be not required to user and manually locate cursor position, secondly, the immobilized substance of display can help user to input content of text accurately,
Reducing input error, in sum, said method and device can improve the content of text input efficiency of text box.
[detailed description of the invention]
As it is shown in figure 1, in one embodiment, a kind of method for displaying textbox, comprise the following steps:
Step S102, monitors whether text box obtains focus.
It is selected that text box obtains focus i.e. text box, can be operated.When text box obtains focus, keyboard strikes
The character entered just enters directly into text box.
In one embodiment, can monitor whether action listener text box obtains focus by the focus of text box.Typically
, when text box obtain focus time, can highlight text frame, such as, display text box frame be blueness etc..
Step S104, when text box obtains focus, in text box, display needs the immobilized substance comprised in input content,
And by the need editor position in cursor positioning to immobilized substance.
In one embodiment, it is necessary to the immobilized substance comprised in input content is the content pre-set.Work as text box
When obtaining focus, read the immobilized substance preset and immobilized substance is shown in text box.Such as, a certain data base URL
Form is " jdbc:oracle:thin:@<IP>:<port>:<database-name>", immobilized substance the most therein be " jdbc:
oracle:thin:@::”.Can for receive the text box of data base URL show immobilized substance " jdbc:oracle:
thin:@::”。
In one embodiment, need input content comprise immobilized substance and one or more need edit field, need edit word
The content of section changes along with the different input contents that needs.In one embodiment, need edit bit be set to text box need input
Content needs the edit field position relative to immobilized substance.Preferably, edit bit is needed to be set to the needing in input content of text box
First needs the edit field position relative to immobilized substance.
Such as, for above-mentioned data base URL, can show in text box immobilized substance " jdbc:oracle:
thin:@::”.The first character section that user need to edit is IP, and after IP is positioned at "@" symbol, therefore, can pre-set and need to compile
After volume position is "@" symbol.Further can be by after cursor positioning to "@" symbol.
Above-mentioned text display method, when text box obtains focus, shows in text box in text box and needs input content
In the immobilized substance that comprises, and will cursor positioning to immobilized substance need to edit position, on the one hand, user does not input and repeatedly inputs
Some immobilized substance, thus save input time, on the other hand, user can be not required to directly from editing position input content
User manuallys locate cursor position, and secondly, the immobilized substance of display can help user to input content of text accurately, reduces input
Mistake, in sum, said method can improve the content of text input efficiency of text box.
As in figure 2 it is shown, in one embodiment, a kind of method for displaying textbox, comprise the following steps:
Step S202, monitors whether text box obtains focus.
Step S204, when text box obtains focus, it is judged that whether text box remains with last input content, if so,
Then perform step S206, if it is not, then perform step S208.
In one embodiment, can store, specify, the upper once input content that position acquisition text box is corresponding.If it is civilian
The interface at this frame place was once previously opened before being currently turned on, and text box have received content of text, and have received
Preserve the instruction of the content of text that text box receives, then can be in advance in the text that designated storage location storage text frame receives
Hold.
Step S206, shows once input content in text box, and by cursor positioning to last input content end
Tail.
Such as, the last input content that data base URL input text box receives is: " jdbc:oracle:thin:@
192.168.1.1:1521:orcl ", and this last time input content be stored in appointment position, then current text frame obtain
During focus, this last time input content can be shown in text box.
Step S208, in text box, display needs the immobilized substance comprised in input content, and by cursor positioning to fixing
Need editor position in content.
In the present embodiment, when text box obtains focus, if text box remains with last input content, then at text box
The last input content of interior display, needs the form of input content owing to last input content has text box, it is possible to decrease need defeated
Enter in the input error that content format complexity causes, and last input and comprise the immobilized substance needed in input content, user
It is not required to edit immobilized substance, it is only necessary to the part of editor's change, thus the input efficiency of text box content of text can be improved.
In one embodiment, above-mentioned method for displaying textbox further comprises the steps of: when text box does not obtains focus, at literary composition
The input prompt information that in this frame, display is preset.Concrete, input prompt information can comprise title and the form needing input content
Information etc..Such as, user display reminding information " can please input user name " in receiving the text box of user name.
In one embodiment, input prompt information includes the immobilized substance needing to comprise in input content that text box is corresponding
And need the description information of edit field.In input prompt information, immobilized substance and the description information needing edit field is relative suitable
Sequence is with to need immobilized substance in input content identical with the relative ranks needing edit field.In one embodiment, edit field is needed
Description information comprise title and/or the pattern of the input etc. needing edit field.
Such as, in above-mentioned data base URL, " jdbc:oracle:thin:@:: " it is immobilized substance, and IP, port and data
Library name is then for needing edit field.Input prompt information can be shown in data base URL input text box: " jdbc:oracle:
Thin:@<IP>:<port>:<database-name>".
Above-mentioned method for displaying textbox, when text box does not obtains focus, shows input prompt information in text box, can
Prompting user needs the form of input content, reduces input error.
Fig. 3 (a), 3(b) and design sketch that (c) is the text box that method for displaying textbox shows.
As shown in (a) state in Fig. 3, when data base URL input text box 301 does not obtains focus, at data base URL
Display input prompt information in input text box 301: " jdbc:oracle:thin:@<IP>:<port>:<database-name>",
The input prompt information of display comprises to be needed the immobilized substance of input content " jdbc:oracle:thin:@:: " and needs edit word
The description information "<IP>", "<port>" and "<database-name>" of section.
As shown in (b) state in Fig. 3, when data base URL input text box 301 obtains focus and does not retains last defeated
When entering content, in data base URL input text box 301, show immobilized substance " jdbc:oracle:thin:@:: ", and by light
Mark 302 navigate to first need the edit field " IP " position relative to immobilized substance, i.e. symbol "@" after.
As shown in (c) state in Fig. 3, when data base URL input text box 301 obtains focus and remains with last defeated
When entering content, in data base URL input text box 301, show once input content " jdbc:oracle:thin:@
192.168.1.1:1521:orcl ", and by cursor 302 navigate to last input content end.
As shown in Figure 4, in one embodiment, a kind of text box display device, monitor module 10, display mould including focus
Block 30 and cursor positioning module 50, wherein:
Focus is monitored module 10 and is used for monitoring whether text box obtains focus.
In one embodiment, focus monitors whether module 10 can monitor action listener text box by the focus of text box
Obtain focus.General, when text box obtains focus, display module 30 can highlight text frame, such as, show text box
Frame be blue etc..
Display module 30 is for when text box obtains focus, and in text box, display needs comprise in input content to fix
Content.
In one embodiment, it is necessary to the immobilized substance comprised in input content is the content pre-set.Work as text box
When obtaining focus, display module 30 can read default immobilized substance and shown in text box by immobilized substance.Such as, a certain
The form of data base URL is " jdbc:oracle:thin:@<IP>:<port>:<database-name>", the most therein fixing in
Hold for " jdbc:oracle:thin:@:: ".Display module 30 can be fixed in the text box for receiving data base URL in display
Content " jdbc:oracle:thin:@:: ".
Cursor positioning module 50 shows, for display module 30, the immobilized substance needing to comprise in input content in text box
Afterwards, by the need editor position in cursor positioning to immobilized substance.
In one embodiment, need input content comprise immobilized substance and one or more need edit field, need edit word
The content of section changes along with the different input contents that needs.In one embodiment, need edit bit be set to text box need input
Content needs the edit field position relative to immobilized substance.Preferably, edit bit is needed to be set to the needing in input content of text box
First needs the edit field position relative to immobilized substance.
Such as, for above-mentioned data base URL, display module 30 can show in text box immobilized substance " jdbc:
oracle:thin:@::”.The first character section that user need to edit is IP, and after IP is positioned at "@" symbol, therefore, can set in advance
Put after needing edit bit to be set to "@" symbol.Cursor positioning module 50 can be by after cursor positioning to "@" symbol.
Above-mentioned textual display device, when text box obtains focus, shows in text box in text box and needs input content
In the immobilized substance that comprises, and will cursor positioning to immobilized substance need to edit position, on the one hand, user does not input and repeatedly inputs
Some immobilized substance, thus save input time, on the other hand, user can be not required to directly from editing position input content
User manuallys locate cursor position, and secondly, the immobilized substance of display can help user to input content of text accurately, reduces input
Mistake, in sum, said apparatus can improve the content of text input efficiency of text box.
As it is shown in figure 5, in one embodiment, a kind of text box display device, monitor module 10 including focus, judge mould
Block 20, display module 30 and cursor positioning module 50, wherein:
Judge module 20 is for when text box obtains focus, it is judged that whether text box remains with last input content.
In one embodiment, it is judged that module 20 once can input in storage corresponding upper of position acquisition text box specified
Content.If the interface at text box place was once previously opened before being currently turned on, text box have received content of text, and
Have received the instruction preserving the content of text that text box receives, then can receive at designated storage location storage text frame in advance
Content of text.
If display module 30 remains with last input content for text box, then once input in display in text box
Content.
Such as, the last input content that data base URL input text box receives is: " jdbc:oracle:thin:@
192.168.1.1:1521:orcl ", and this last time input content be stored in appointment position, then current text frame obtain
During focus, this last time input content can be shown in text box.
Light, after display module 30 shows once input content in text box, is demarcated by cursor positioning module 50
Position is to last input content end.
If display module 30 is additionally operable to text box does not retains last input content, then in text box, display need to input
The immobilized substance comprised in appearance.
Cursor positioning module 50 be additionally operable to display module 30 show in text box need input content comprises fixing in
After appearance, by the need editor position in cursor positioning to immobilized substance.
In the present embodiment, when text box obtains focus, if text box remains with last input content, then at text box
The last input content of interior display, needs the form of input content owing to last input content has text box, it is possible to decrease need defeated
Enter in the input error that content format complexity causes, and last input and comprise the immobilized substance needed in input content, user
It is not required to edit immobilized substance, it is only necessary to the part of editor's change, thus the input efficiency of text box content of text can be improved.
In one embodiment, display module 30 is additionally operable to when text box does not obtains focus, and in text box, display is pre-
If input prompt information.Concrete, input prompt information can comprise title and the format information etc. needing input content.Such as,
User display reminding information " can please input user name " in receiving the text box of user name.
In one embodiment, input prompt information includes the immobilized substance needing to comprise in input content that text box is corresponding
And need the description information of edit field.In input prompt information, immobilized substance and the description information needing edit field is relative suitable
Sequence is with to need immobilized substance in input content identical with the relative ranks needing edit field.In one embodiment, edit field is needed
Description information comprise title and/or the pattern of the input etc. needing edit field.
Such as, in above-mentioned data base URL, " jdbc:oracle:thin:@:: " it is immobilized substance, and IP, port and data
Library name is then for needing edit field.Display module can show input prompt information in data base URL input text box: " jdbc:
Oracle:thin:@<IP>:<port>:<database-name>".
Above-mentioned text box display device, when text box does not obtains focus, shows input prompt information in text box, can
Prompting user needs the form of input content, reduces input error.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed, but also
Therefore the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that, for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, it is also possible to make some deformation and improvement, these broadly fall into the guarantor of the present invention
Protect scope.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.