Tabindex for textfield
Hi,
Plz tell me how to set a html like tabindex for swinf text fields.
Thanks a lot,
Chamal.
[http://forums.sun.com/thread.jspa?threadID=5280260&messageID=10176641]
Similar Messages
-
How to handle LostFocus event for TextField in J2ME?
Hi:
I want to handle LostFocus event for TextField in J2ME.
So can anybody help me.....
Thank YouMIDP API does not have LostFocus event.
You can try setting ItemStateListener for the TextField ([if needed, click here for details|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/ItemStateListener.html]). API requires that +"...For implementations that have the concept of an input focus, the listener should be called no later than when the focus moves away from an item whose state has been changed. The listener should be called only if the item's value has actually been changed...."+ -
How to set max length for TextField ?
how do i go about setting a max length for a TextField in jdk1.1.8 ?
a while back there was a topic on this but it was for jdk1.0
please helpwell if it works in 1.0 it will most likely also work in 1.1.8 if it is depricated you can use the -deprication option during compilation to see what is derpricated and what method i advised to use now.
there may however be an easyer way in 1.1.8 but i don't know that.
hope this helps you,
Robert -
Auto font size for textfield by javascript
Hi there. I got the following script for a textfield in a fillabe PDF. Th length of the textfield is 150. It is required that if the text is > 100, the text size will be set to point 8, otherwise it will be point 12.
var tf = this.rawValue;
if (tf.length>50) {
tf.textSize=8;
The above script was added to the script editor show=Change (not ok), full (failed), validate & validationState (no response). Did I miss something?
Thanks.Can anyone please advise?
Cheers -
Setting dynamic widths for textfields in as3?
I have 3 textfields. they're in a sprite container. 1. date 2. pipe_mc movieclip 3. title field. I need to set it so that the textfield/mc/textfield;s x property changes dynamically when a shorter or longer date gets added into the field, via XML.
Here is the code:
addChild(dateline);
dateline.addChild(date_txt);
dateline.addChild(title_txt);
dateline.addChild(pipe_mc);
date_txt.x = 3;
var spacer:Number = 10;
if (date_txt.textWidth >= 90) {
pipe_mc.x = date_txt.x + date_txt.width + 18;
title_txt.x = pipe_mc.x + pipe_mc.width + spacer;
else if (date_txt.textWidth <= 90) {
pipe_mc.x = date_txt.x + date_txt.width - 18;
title_txt.x = pipe_mc.x + pipe_mc.width + spacer;
pipe_mc.visible = true;
Any help or suggestions are welcome
ThanksDo you have the textfield set up to be autoSized? Is there a reason for having three textfields separate rather than combining the text into one textfield with sufficient spacing between the entries?
-
I migrate an application from JSC2 EA2 to JSC2 final release
In one of my page (first page that i check after migration) I have some text field.
In a button action i used those textfields Text for some processing.
Now after i press submit key (whether text boxes are full or empty) i get null pointer exception when i try to access the textfields text
by using getTextField1().getText().toString()
can any one say where i have mistaken in my migration plane ?
ThanksHi,
Suggest to replace all butttons using FCS version.
There was some change from EA to FCS for buttons.
e.g. if you have multiple buttons on a Page that was created using EA
then the wrong action handler will get called
hth
John -
How to set cursor type for TextField uses
Hello, hope someone can help. I'm importing HTML into a
TextField called "webText_htm". I'm also calling CSS and it is
working to style the text. Player 8 and ActionScript 2
When I mouseover the TextField, the cursor changes to the
I-bar.
Second problem is that <a href=""> is not signalling
the Hand Cursor, and does not do anything when I click on it.
Thanks in advance
Gregshrinktight,
> Hello, so this is sort of a dumb question; I've become
> acquainted with the help docs. Is that the best place
> to look up properties for a class?
I think so, mainly because it's so easily within reach. I
tend to fire
up the ActionScript 2.0 and/or Component Language Reference
and start there.
If I can't find what I need, I hit the LiveDocs version
http://livedocs.macromedia.com/),
which has developer notes. If I'm still
stuck, I head to the forums.
> Is thre a reference somewhere that I can study which
> explans each property? Where can I find that stuff?
For 99% percent of it (informal estimate, of course), just
hit the F1
key and search. Every object in ActionScript is defined by
its namesake
class. Again, properties describe the object's
characteristics, methods
describe things the object can do, and events describe things
the object can
react to.
This may help get you started.
http://www.communitymx.com/abstract.cfm?cid=01B54
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
Regular Expressions for textfield syntax checking while typing?
Hi all,
my application has a textfield for entering customer numbers. The customer numbers have a certain syntax which I want to have checked while the user types.
According to our company's style guide, the textfield's background color has to be
- RED in case of an error,
- WHITE in case of correct input,
- YELLOW when the input is incomplete but the beginning is correct.
To check the syntax with Regular Expressions is easy for the WHITE and RED cases. But I'm struggling with the YELLOW case.
public static boolean checkTest(String s) {
String regExp = "(\\d{6,8},\\d{1,3},\\d{1,3},\\d{1,2})";
return Pattern.matches(regExp, s);
}The above method returns true for the following examples:
"12345678,1,2,3"
"123456,11,22,33"
"1234567,123,123,12"
I now need another method which returns true if the user entered a valid beginning, for example:
"123"
"1234567,"
"123456,123,1"
Any ideas? I would be glad to get this done...@notivago
In the meantime I also came up with a pattern to
check the YELLOW case:
String partly =
"\\d{0,8},?|\\d{6,8},\\d{0,3},?|\\d{6,8},\\d{1,3},\\d{
0,3},?|\\d{6,8},\\d{1,3},\\d{1,3},\\d{0,2}";Sounds good to me.
It seems to work. But my actual goal is to do such
color-coded syntax checking for other number types
(other patterns) as well. And it should be easy to
add or change number types.I cant figure how to do that for now.
So it would be nice to have a generic way to generate
the YELLOW-pattern from the other one. Is it
possible? Probably, but I cannot come up with any idea now.
Is there a better solution than my one
("String partly" above)? Something I can just append
to the original pattern for example?There are others, but it is hard to say what would be better or worse. -
TabIndex for DateFields broken
I am having a problem with tabbing skipping "DateFields" even
though tabIndex has been properly set. I've searched online and
found a number of others stating the same issue but with no
resolution.
AS2.0
Flash 7/8
Publshed from Flash CS3
Mac OSX, FirefoxWho told you it can't be repaired? Any iPod can be repaired. It just becomes a price point. Check the Electronics link in Craigslist for iPod repair. Make sure you talk with the person to be sure they are reputable? Normally they will give you a quote for an evaluation and after that they will give you an estimate of the cost and you can decide whether to pursue it.
Doug -
Disabling paste option for textfield
how to disable only ctrl+v option for a textfield.?
Thanx for the link.
However, i'm working on swt components.Same principle applies I suppose. Note that SWT might be better discussed in an SWT forum, since it's not part of the standard Java libs.
I've applied Verfify Keylistener, but i'm not able to
stop ctrl+v activity.You also won't stop CTRL+INS activity or insertion by mouse context menu... listeners aren't really the best approach. -
I would like to make ONE event-handler for users who
- presses Return/Enter from a field or
- uses the mouse to jump to another field or
- uses the tab-key to jump to another field.
Can this be handled by using only one event-handler, ex. focusLost ?
I appreciate your answer.
Have a nice day.I used a single FocusListener with 3 different TextFields to select all the text in a TextField whenever the TextField gained focus, plus updated the other 2 TextFields based on the contents of the third when the third lost focus. Is that like what you are looking for?
-
For an education-app I'm making in inDesign and DPS I'm looking for a good way to make textfields for the user where the input stays.
So the user must be able to answer questions and the answers must stay readable in the app.
I tried it before: I added a html-textfield in an app but when I go to another article and back or close and open the app, the textfield is empty again.
Does someone knows howto?
AntonettaThere is a type dialog above the default value ...what is that set to? Are you trying this in preview? If so check the File/Form Properties/Preview
and make sure the Preview Type drop down is set to Interactive and not Print Form.
Paul -
Set maximum column for textfield
in jsf, you can set the maximum column of a textfield size by code llike
<h:inputText maxlength="15">
once you type a string of given lengh=15, the cursor cannot move further ie. cannot type more charactes.
Any similiar one in the swing text components?. have searched and cannot get it. .setColumns(int col); doesnt seems that way.Unfortunately not. You could try to use a JFormattedTextField or you inherit from PlainDocument and override insertString()
BTW: if you post such questions to the [Swing forum|http://forum.java.sun.com/forum.jspa?forumID=57] you might get better/quicker answers -
Can't change constraints for TextField
Hi all,
I am working on midlet and I need the following functionality at one form. On that form there are ChoiseGroup and TextField. Depends on choosen item in ChoiceGroup the TextField should become editable or uneditable. All works fine until TextField don't receive focus. If TextField receives focus and after that I choose item in ChoiceGroup which changes TextField's constraints I have got an exception
java.lang.NullPointerException
at com.sun.midp.lcdui.DefaultInputMethodHandler.setConstraints(+63)
at javax.microedition.lcdui.TextField$InputMethodClientImpl.setConstraints(+20)
at javax.microedition.lcdui.TextField.setConstraints(+37)
at com.usl.smash.mobile.form.AuthenticationForm$1.itemStateChanged(+92)
at javax.microedition.lcdui.Form.callItemStateChanged(+27)
at javax.microedition.lcdui.Display.callItemStateChanged(+14)
at javax.microedition.lcdui.Display.access$900(+5)
at javax.microedition.lcdui.Display$DisplayAccessor.callItemStateChanged(+8)
at javax.microedition.lcdui.Display$DisplayManagerImpl.callItemStateChanged(+10)
at com.sun.midp.lcdui.DefaultEventHandler.itemStateChangedEvent(+17)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+835)
Code snippet
String someText = choiceGroup.getString(choiceGroup.getSelectedIndex());
if(someText.equals("New")) {
textField.setConstraints(TextField.ANY);
textField.setString(null);
} else {
textField.setConstraints(TextField.UNEDITABLE);
textField.setString(someText);
}I am using J2ME Wireless Toolkit 2.2
Can somebody explain what I am doing wrong?
Thanks in advanceI wouldn't have set it null, instead placing an empty string " " instead:
if(someText.equals("New")) {
textField.setConstraints(TextField.ANY);
textField.setString("");
Perhaps?
Just a suggestion.
C -
Hi,
I am using safari 8.0 on latest mac system. I am web developer. My website do not support keyboard tab button for some of html controls for safari 8.0. I have apply tab index for these controls( input type="radio" ,check box and button tag).
Please help me to resolve this problem.
ThanksPost a link to your webform with these controls
I am unable to test on Safari 8.x, but have you tried changing the UserAgent from the Developers Tools menu? My UserAgentSwitcher for Firefox only goes up to 7.xx Mavericks, but Safari's should be backwards 'compatible' a very long way.
I am unsure whether you cannot TAB between these controls (normal browser behavior) or whether you have some special code that "SELECTS" each control as you go through them? The latter seems unworkable for any scenario I can imagine - if I want to select something I have brought into focus, the normal action would be to press the ENTER key while control or link is focused, then TAB on through choices to the next selection to be made
Please clarify what exactly the problem is (for *me* at least)
ÇÇÇ
Maybe you are looking for
-
How do I sync my iPhone contacts on iPad Air
How do I sync my iPhone contacts on iPad Air. iCloud is already enabled and configured on both devices but can not get my contacts in the iPad. Additionally, the groups button isn't in contacts app and when I save a new contact on the iPad simply di
-
How to Restrict Single Delivery Date for PO with Multiple Line Items
Dear Experts, How to Restrict Single Delivery Date for PO with Multiple Line Items. System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode. Can we achive this by Some Enhancement i
-
3+yr old PBook no boot, now booting -but Slloooowwwllly and maybe not fully
O helpful souls of .mac-BBSland: I have a just-past-AppleCare PB that has been perfectly reliable for 3 years. It's running up-to-latest-rev Panther 10.3.9 with several apps -- Eudora, FireFox, iTunes, iPodderX, notepad were running when the problem
-
Occurence of character in a string
How can i find how many occurrence of a character in a string? Let's say: 010101010101010: there is 8 0 in that string.
-
Option to select different financial periods in report:S_ALR_87100185
Hi All, 1) Is it possible to have option to select different financial periods, in report: S_ALR_87100185 2) Excel download functionality in report : S_ALR_87100185 Regards, Samir Bhadekar