Search Results

Search found 799 results on 32 pages for 'textfield'.

Page 1/32 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • iPhone keyboard's return key will move curser to next textfield

    - by iAm
    Hello Fellow Koder ••• I have a TableViewController that is using a grouped Style and has two(2) sections. The first section has 4 rows and the second section has 3 rows. I have placed a UILabel and a UITextField in each cell, and have a custom method(textFieldDone:) to handle the cursor movement to the next text field when the return key is press. This works fine and dandy if there is only one section, but I have two :( and yes I need two:) so I started koden' up an answer, but got results that just don't work, I did notice during my debugging that cell Identifier (I use Two) is only showing the one (in the debug consol) and it's the first one only (Generic Cell). - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = nil; switch (indexPath.section) { case AUTO_DETAILS: { static NSString *cellID = @"GenericCell"; cell = [tableView dequeueReusableCellWithIdentifier:cellID]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:cellID] autorelease]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 75, 25)]; label.tag = kLabelTag; label.font = [UIFont boldSystemFontOfSize:14]; label.textAlignment = UITextAlignmentRight; [cell.contentView addSubview:label]; [label release]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(90, 12, 200, 25)]; textField.clearsOnBeginEditing = NO; [textField setDelegate:self]; [textField addTarget:self action:@selector(topTextFieldDone:) forControlEvents:UIControlEventEditingDidEndOnExit]; [cell.contentView addSubview:textField]; } NSInteger row = [indexPath row]; UILabel *label = (UILabel *)[cell viewWithTag:kLabelTag]; UITextField *textField = nil; for (UIView *oneView in cell.contentView.subviews) { if ([oneView isMemberOfClass:[UITextField class]]) textField = (UITextField *)oneView; } label.text = [topCellLabels objectAtIndex:row]; NSNumber *rowAsNum = [[NSNumber alloc] initWithInt:row]; switch (row) { case kMakeRowIndex: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.make; break; case kModelRowIndex: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.model; break; case kYearRowIndex: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.year; break; case kNotesRowIndex: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.notes; break; default: break; } if (textFieldBeingEdited == textField) { textFieldBeingEdited = nil; } textField.tag = row; [rowAsNum release]; break; } case AUTO_REGISTRATION: { static NSString *AutoEditCellID = @"AutoEditCellID"; cell = [tableView dequeueReusableCellWithIdentifier:AutoEditCellID]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:AutoEditCellID] autorelease]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 75, 25)]; label.tag = kLabelTag; label.font = [UIFont boldSystemFontOfSize:14]; label.textAlignment = UITextAlignmentRight; [cell.contentView addSubview:label]; [label release]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(90, 12, 200, 25)]; textField.clearsOnBeginEditing = NO; [textField setDelegate:self]; [textField addTarget:self action:@selector(bottomTextFieldDone:) forControlEvents:UIControlEventEditingDidEndOnExit]; [cell.contentView addSubview:textField]; } NSInteger row = [indexPath row]; UILabel *label = (UILabel *)[cell viewWithTag:kLabelTag]; UITextField *textField = nil; for (UIView *oneView in cell.contentView.subviews) { if ([oneView isMemberOfClass:[UITextField class]]) textField = (UITextField *)oneView; } label.text = [bottomCellLabels objectAtIndex:row]; NSNumber *rowAsNum = [[NSNumber alloc] initWithInt:row]; switch (row) { case 0: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.vinNumber; break; case 1: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.policyNumber; break; case 2: if ([[tempValues allKeys] containsObject:rowAsNum]) textField.text = [tempValues objectForKey:rowAsNum]; else textField.text = automobile.licensePlate; break; default: break; } if (textFieldBeingEdited == textField) { textFieldBeingEdited = nil; } textField.tag = row; [rowAsNum release]; break; } default: break; } return cell; } Now remember that the first section is working fine and the kode for that method is this: -(IBAction)topTextFieldDone:(id)sender { UITableViewCell *cell = (UITableViewCell *)[[sender superview] superview]; UITableView *table = (UITableView *)[cell superview]; NSIndexPath *textFieldIndexPath = [table indexPathForCell:cell]; NSUInteger row = [textFieldIndexPath row]; row++; if (row > kNumOfEditableRows) row = 0; NSUInteger newIndex[] = {0, row}; NSIndexPath *newPath = [[NSIndexPath alloc] initWithIndexes:newIndex length:2]; UITableViewCell *nextCell = [self.tableView cellForRowAtIndexPath:newPath]; UITextField *nextField = nil; for (UIView *oneView in nextCell.contentView.subviews) { if ([oneView isMemberOfClass:[UITextField class]]) nextField = (UITextField *)oneView; } [nextField becomeFirstResponder]; } It was my idea to just create a second method (secondSectionTextFieldDone:) like this -(IBAction)bottomTextFieldDone:(id)sender { UITableViewCell *cell = (UITableViewCell *)[[sender superview] superview]; UITableView *table = (UITableView *)[cell superview]; NSIndexPath *textFieldIndexPath = [table indexPathForCell:cell]; NSUInteger row = [textFieldIndexPath row]; row++; if (row > 3) row = 0; NSUInteger newIndex[] = {0, row}; NSIndexPath *newPath = [[NSIndexPath alloc] initWithIndexes:newIndex length:2]; UITableViewCell *nextCell = [self.tableView cellForRowAtIndexPath:newPath]; UITextField *nextField = nil; NSString *string = [NSString stringWithFormat:@"AutoEditCellID"]; for (UIView *oneView in nextCell.contentView.subviews) { NSLog(@"%@", nextCell.reuseIdentifier); /* DEBUG LOG */ if ([oneView isMemberOfClass:[UITextField class]] && (nextCell.reuseIdentifier == string)) nextField = (UITextField *)oneView; } [nextField becomeFirstResponder]; } but the result does not solve the issue. so my question is, how can i get the cursor to jump to the next textfield in the section that it is in, If there is one, and if not, then send a message "resignFirstResponder" so that, the keyboard goes away.

    Read the article

  • J2ME TextField Exception

    - by Bob
    When I instantiate a textField, I have a number in it that I want to be the default text. The problem is, I can't seem to be able to place that value into the textfield without getting an error. The strange thing about it is that the same TextField is what I use to set the value of the variable containing the number. TextField myTF = new TextField("Number", value, 10, TextField.NUMERIC); When I run this code, I receive an exception stating that value doesn't match the constraints of TextField.NUMERIC. However, when I check the vale of the value of the variable, I get the following output: value = 1234567890 value.length() = 10 The value is set by the same TextField, saved to the phone that I am working on, and when loaded from the phone's settings, throws an exception.

    Read the article

  • TextField - behave like PowerPoint

    - by user310113
    I have a Dynamic TextField created with ActionScript (multiline, wordwrap & autosize=true). While running the SWF, if you click into the TextField you get an arrow "move" cursor, then you can double-click to put it into Edit mode to select text. I want it to work like PowerPoint - if you click into the box you'll always get a flashing cursor with the ability to select/insert text, and you can click on the borders to drag, or the corners to resize. I tried adding the focusIn event textField.stage.focus = this.textField but this didn't seem to do anything. When you click into the textField, I basically want it to act as though you followed with a double-click (Edit mode) without actually having to do the double-click. Bonus: and instead of a 2nd double-click returning you to the Move mode (or whatever it's called) I want to select all text. TL;DR: Is there some property of a Dynamic TextField that I can get/set to see if I'm in Edit or Move mode?

    Read the article

  • Remove appearance of TextField in droidText : Android

    - by AnujAroshA
    I am trying to create a PDF using droidText library. There I want to place some text content in the middle of the page but align to left. I was unable to do with Paragraph class and setAlignment() method. So I have decided to use TextField class. Below is the code I have used, Document document = new Document(PageSize.A4); try { PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + "TextFields.pdf")); document.open(); TextField tf = new TextField(writer, new Rectangle(100, 300, 200, 350), "Content"); tf.setText("This is the content of text field"); tf.setAlignment(Element.ALIGN_CENTER); tf.setOptions(TextField.MULTILINE | TextField.REQUIRED); PdfFormField field = tf.getTextField(); writer.addAnnotation(field); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } document.close(); Code works perfect, but the out put PDF file that I am getting has this TextField which can be editable and also change the font appearance when I am click on the TextField. I don't want that in to my final PDF. How can I remove that attribute? If it is not possible, is there any other way I can position some text in a PDF file using droidText library in Android?

    Read the article

  • How to move to next textfield using keyboardtype numberandpunctuation using textfield notification

    - by Rani
    Hi guys, I am having code ItemsController.h UITextField* quantity; UITextField* rate; UITextField* tax2; ItemController.m quantity=[[UITextField alloc]initWithFrame:CGRectMake(158,10.5,140,30)]; quantity.textColor = [UIColor blackColor]; quantity.font = [UIFont systemFontOfSize:15.0]; quantity.backgroundColor = [UIColor clearColor]; quantity.returnKeyType=UIReturnKeyNext; quantity.keyboardType = UIKeyboardTypeNumbersAndPunctuation; quantity.leftViewMode = UITextFieldViewModeAlways; quantity.delegate = self; rate=[[UITextField alloc]initWithFrame:CGRectMake(158,10.5,140,30)]; rate.textColor = [UIColor blackColor]; rate.font = [UIFont systemFontOfSize:15.0]; rate.backgroundColor = [UIColor clearColor]; rate.returnKeyType=UIReturnKeyNext; rate.keyboardType = UIKeyboardTypeNumbersAndPunctuation; rate.leftViewMode = UITextFieldViewModeAlways; rate.delegate = self; tax2=[[UITextField alloc]initWithFrame:CGRectMake(158,10.5,140,30)]; tax2.textColor = [UIColor blackColor]; tax2.font = [UIFont systemFontOfSize:15.0]; tax2.backgroundColor = [UIColor clearColor]; tax2.returnKeyType=UIReturnKeyDone; tax2.keyboardType = UIKeyboardTypeAlphabet; tax2.leftViewMode = UITextFieldViewModeAlways; tax2.delegate = self; - (BOOL)textFieldShouldReturn:(UITextField*)textField { if(textField==quantity) { [rate becomeFirstResponder]; } if(textField == rate) { [tax2 becomeFirstResponder]; } else if(textField==tax2) { [textField resignFirstResponder]; } return YES; } Using UITextfield notifications while I am moving from quantity textfield to rate textfield the keyboard type is alphabetical its getting actually I gav eit has Number and punctuation why I am not getting. can any one help me to solve this as soon as possible. Thanks in advance.

    Read the article

  • actionscript 2.0:Check TextField in flash

    - by RedsDevils
    I have some problem in check two textfield.text comparison. One TextField.text value is come from calculation and the other textField is from user input. When I check those two text, the TextField.text value didn't show and I can't compare those two. How can I compare in actionscript 2.0. Please Help me! Thanks in advance!

    Read the article

  • TextField instance inside a button Layer is null

    - by php html
    I've created an button object in flash. The button contains 2 layers. One is the background image and on top of it is a textField. The textfield is dynamic. I use the button inside a movieclip and I export it in a SWC. The I'm trying to use it in flex. I'm trying to do this: var myComponent:MyComponent = new MyComponent(); myComponent.button01.theTextField.text = "Caption"; I get and instance of the button, but the instance of the textField is null and I'm not able to change the text(but the default text appears onscreen). Does anyone has any idea what is wrong? Here is the button timeline(Layer 2 contains the textfield, and the textfield instance is named theTextField):

    Read the article

  • TextField instance inside a button created in a separate layer in Flash is null in Flex

    - by php html
    I've created an button object in flash. The button contains 2 layers. One is the background image and on top of it is a textField. The textfield is dynamic. I use the button inside a movieclip and I export it in a SWC. The I'm trying to use it in flex. I'm trying to do this: var myComponent:MyComponent = new MyComponent(); myComponent.button01.theTextField.text = "Caption"; I get and instance of the button, but the instance of the textField is null and I'm not able to change the text(but the default text appears onscreen). Does anyone has any idea what is wrong? Here is the button timeline(Layer 2 contains the textfield, and the textfield instance is named theTextField):

    Read the article

  • Create your own HTML Textfield with Javascript

    - by teehoo
    I came across the following http://ckeditor.com/demo , and was wondering if anyone had a basic tutorial how to implement this (or perhaps what key search terms I should use)? Is this just a heavily modified TextField, or have they somehow managed to create a completely new TextField from scratch? I tried googling this many times, and I always get pages relating to customizing the built-in TextField with CSS etc.

    Read the article

  • AS3 TextField - unwanted carriage return when setting value to ""

    - by jevinkones
    I have an input TextField and have a KeyboardEvent.KEY_DOWN even listener on the stage to listen for the Keyboard.ENTER event. The event listener adds the entered text to an array or whatever, and then clears the TextField. The problem is that when the Enter key event fires and the TextField value is set to "", it leaves a carriage return in the TextField and the cursor positioned on the second line. WTF? I've been coding AS2 and AS3 for a LONG time and have never ran into this before. Am I losing my mind? Please help, people! :-) Example: var myTextArray:Array = new Array(); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); function onKeyDown(e:KeyboardEvent):void{ if(e.keyCode == Keyboard.ENTER){ if(_inputText.text != null){ myTextArray.push(_inputText.text); } _inputText.text = ""; } }

    Read the article

  • textfield value empty when i fill it with javascript

    - by Turi
    i am using modalpopup to enter some value in a textfield. after the value is selected in the modalpopup view, the modalpopup is closed and the value has taken the propriate value. Even if the value is displyed in the textfield, the textfield1.text returns me string empty. when i see the source code (html), i see that even that the textfield is displaying something it hasn't really this value in it, because the appropriate html input field hasn't value yet. thats the code i use to fill this textfield. function CloseRequestModal(s) { document.getElementById('<%=txtRequest.ClientID%>').value = s; var mpu = $find('<%=ModalPopupExtender3.ClientID%>'); mpu.hide(); } Please Help, Thanks in advance.

    Read the article

  • j2me: How to use setCommandListener on a TextField?

    - by SmRndGuy
    I wanted to make it so that when I select a specific TextField in a Form, I get a specific list of Commands, for example TextField: OK, CancelTextField2: OK, Back, Help And I succeeded by using addCommand() on each of TextFields but I can't tell it what to happen when when I activate one of these commands since there is no setCommandListener method for them. It throws a NullPointerException when I click it.I also tried to get the commands from their Form but it is receiving only the commands that it contains, not the commands that TextFields have Any help how to get arround this? Thanks in advance

    Read the article

  • html textfield in WebView in an Android application is hidden by the soft keyboard

    - by user280503
    Hello, I have an Android application that is a TabHost with a WebView. I use it to load a specific html file that has a text field in its bottom part. When I touch the html textfield, the soft keyboard pops up, and hides the textfield, so that I cannot see what I have typed. Here is the layout: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TabWidget android:focusableInTouchMode="false" android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="63dp" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" /> </LinearLayout> </FrameLayout> </LinearLayout> </TabHost> I have tried to configure the AndroidManifest.xml file with android:windowSoftInputMode="adjustResize" with no success. I have also tried replacing the FrameLayout in my layout with ScollView, but that caused my webview to increase in size indefinitely when the application is running.. this may be due to some javascript I have running on the page. I have noticed that the android's web browser has a nifty behaviour - in a web page, after the soft keyboard pops up, the web page scrolls smoothly so that the focusable textfield is visible to the user. How can I have this kind of behavior in my applicaiton?

    Read the article

  • UIALertView - retreive textfield value from textfield added via code

    - by George
    Here is the code I have to create an UIalertView with a textbox. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Enter A Username Here" message:@"this gets covered!" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:@"OK!", nil]; UITextField *myTextField = [[UITextField alloc] initWithFrame:CGRectMake(12, 45, 260, 25)]; CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0, 60); [alert setTransform:myTransform]; alert.tag = kAlertSaveScore; [myTextField setBackgroundColor:[UIColor whiteColor]]; [alert addSubview:myTextField]; [alert show]; [alert release]; [myTextField release]; My question is, how do I get the value from the textfield in: - (void) alertView:(UIAlertView *) actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { } I know I can get the standard stuff for the alertview such as actionSheet.tag and such, but how would I get the above created textfield? Thanks in advance for any and all help. Geo...

    Read the article

  • TextField Caret Does Not Display in Actionscript 3

    - by Cinegod
    Hello all, I am trying to display a text field that has text inside it, and display the flashing Caret at the end of the text. I have tried the following: Code: // ti_title is my textField stage.focus = ti_title; ti_title.setSelection( ti_title.length, ti_title.length ); I have also tried: // ti_title is my textField ti_title.stage.focus = ti_title; ti_title.setSelection( ti_title.length, ti_title.length ); The field is focused because I can type into it, but I do not see a Caret until I have started typing. This is not very good for usability. I have even tried removing text then re-adding it and then setting the selection again, but still not working. Any ideas? all the best nG

    Read the article

  • How to create dynamic textfield based on radio button's input

    - by qdog
    I am trying to get a form's textfield to dynamically appear based on a radio checkbox selection. For example, on my form...there is a radio button that ask "Do you want to enter your age?" with an option to check YES or NO. If the user check YES, a textfield dynamically appear after this so the the user can enter his or her age. If user check NO, then nothing happen. How do I begin to do something like this? Just looking for any feedback I can get. Thanks!

    Read the article

  • ExtJS textfield save entered values for later use

    - by Manny Calavera
    Hello. I am using ExtJS 3.0 . I would like to have a textfield inside my form that could remember user entered data after the submit of the form so if I want to enter the save value later, I would not write the full text, it should be selectable from list like the default HTML text field behavior when it remembers the entered data and you can write the same from the list. Any ideas ?

    Read the article

  • Using Sharepoint TextField, Label Field to get bounding data from multi list

    - by HieuNT
    Hi all, I have to make a custom webpart in sharepoint 2010 to customize defaults form of SP List. But, the custom form i make have a field must get/set data to field of other list. Sample : I make a custom create custom Editform.aspx for List A by add a webpart to this page, that add. but in it have a text box that load data from a field in List B. is it possible to use method FieldName in TextField class ? Thank alot.

    Read the article

  • how to get textfield data in win32-gui perl

    - by amit
    hi i want to store textfield data in a variable but my code is not working here is my code use Win32::GUI(); my $W1 = Win32::GUI::Window-new( -name = "W1", -title = "First Window", -pos = [ 100, 100 ], -size = [ 300, 200 ], ); $W1-AddButton( -name = "ButtonW1", -text = "Enter Chipname", -pos = [ 87, 100 ], #-ok = 1, ); $W1-AddTextfield( -name = "chipfield", -left = 20, -top = 40, -width = 250, -height = 20, # -prompt = ["Mix ",30], ); $W1-Show(); Win32::GUI::Dialog(); exit(0); sub W1_Terminate { return -1; } sub ButtonW1_Click { $chipname = $W1-chipfield-Text(), print $chipname; #return 0; } please help me where is problem

    Read the article

  • Why does the textField not show up when I change the defaultTextFormat

    - by Leon
    I have an if/else statement which checks the length of my current title, and then is suppose to change the defaultTextFormat of the title textField and set the text. Currently the title will not show up now, no matter what character length the title is, any thoughts on what I could be doing wrong here? public function switchTitle(sentText):void { titleString = sentText; trace("---------"+"\n"); trace("Forumula testing"); trace("titleString = "+titleString); trace("titleString.length = "+titleString.length); trace("titleSize/10 = "+(titleSize/10)); trace("\n"); // If Title can fit: if (titleString.length < (titleSize/10)) { vTitle.defaultTextFormat = Fonts.VideoTitle; titleString = sentText; // If Title can't fit: } else if (titleString.length >= (titleSize/10)) { vTitle.defaultTextFormat = Fonts.VideoTitle2; titleString = sentText; } trace("---------"+"\n"); //vTitle.text = titleString; // <-- Original code, worked }

    Read the article

  • as3 formatting a textfield

    - by duckofrubber
    Hi, I'm dynamically creating textfields in as3, and formatting them with the TextFormat class. I'm having some issues though with selecting the exact "style" of font to apply to the textfields. My code so far looks like: formatT = new TextFormat( ); formatT.bold = false; formatT.color = 0x000000; formatT.font = "TradeGothic"; formatT.size = 16; var textItem = new TextField(); textItem.text = "foobar"; textItem.setTextFormat(formatT); addChild(textItem); This works ("Trade Gothic" is applied to the enclosed text), however I can't figure out how to apply a specific style of "Trade Gothic", for instance "Light Oblique". Is there some way that I can specify this using the TextFormat class? Thanks.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >