Search Results

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

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

  • Textfield - what is wxTextCtrlNameStr?

    - by Wallter
    I'm trying to create a basic wxWidgets program with a text entry box, in the constructor there is a variable wxTextCtrlNameStr - in researching I can't seem to find wxTextCtrlNameStr? any help? wxTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr) My Code: MainFrame::MainFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title) { wxButton * Centigrade = new wxButton(this, BUTTON_CENTIGRADE, _T("to Centigrade"), wxPoint(20, 20), wxDefaultSize, 0); wxButton * Fahrenheit = new wxButton(this, BUTTON_FAHRENHEIT, _T("to Fahrenheit"), wxPoint(20, 40), wxDefaultSize, 0); F_txt = new wxTextCtrl(this, TXT_F_Main, "0", wxDefaultPosition, wxDefaultSize, wxDefaultValidator, wxTextCtrlNameStr); /***********************************************/ C_txt = new wxTextCtrl(this, TXT_C_Main, "0", wxDefaultPosition, wxDefaultSize, wxDefaultValidator, wxTextCtrlNameStr); /***********************************************/ ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...

    Read the article

  • UITextField to show UIPickerView in xcode 4.3.2 using textField.inputView

    - by ChromeBlue
    I'm looking to have a UITextField display a UIPickerView when touched. I found quite a few questions on the same topic that say to use UITextField.inputView. However, when I try, nothing changes. I have a very simple code: setupViewController.h #import <UIKit/UIKit.h> extern NSString *setupRightChannel; @interface setupViewController : UIViewController { UITextField* rightChannelField; UIPickerView *channelPicker; } @property (retain, nonatomic) IBOutlet UITextField* rightChannelField; @property (retain, readwrite) IBOutlet UIPickerView *channelPicker; setupViewController.m #import "setupViewController.h" @Interface setupViewController() @end @implementation setupViewController @synthesize rightChannelField; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.title = @"Setup"; // Do any additional setup after loading the view from its nib. rightChannelField.inputView = channelPicker; } -(IBAction)okClicked:(id)sender { setupRightChannel = rightChannelField.text; } I feel like I might be missing something fundamental here, but I honestly cannot think of what it is.

    Read the article

  • TextField Listener

    - by coubeatczech
    Hi, there's a swing JTextField, and I want to add a listener, so whenever the users types a single letter, there's an event. There's a ValueChanged event in scala api, but I don't get it what's it's peer. So which one Listener should I use? KeyListener and implement reasonably just one method?

    Read the article

  • Flash CS5 screwed up all my textfields - how can I correct this?

    - by WillyCornbread
    Hi - I have an Actionscript project that I was building using Flash CS4. I embedded a font using the follow: [Embed(source="/bin/assets/fonts/MyriadPro-Regular.otf", fontWeight="normal", fontFamily="Myriad Pro")] Then throughout my application in my TextFields I would set embedFonts to true antialiastype to advanced and set the thickness property of the text field. And setting the font-family from a stylesheet. This was all working exactly as I expected it would with no issues whatsoever and months of development. I just upgraded to CS5 and published and none of my text is rendered at all. I was able to resolve this by removing the embedFonts = true from the textfields, but this leaves me with no control over the thickness at all. I searched everywhere, does anyone know what the proper way to do this in CS5 is now? I've tried embedding my font directly within the CS5 IDE but still no thickness control. Thanks in advance for any help - I've got tons of textfields throughout my app that are all ganked right now. Thanks Adobe. b

    Read the article

  • TextField Covering UIAlertView's Button.

    - by XcodeDev
    Hi, I am using a UIAlertView with three buttons: "Dismiss", "Submit Score" and @"View Leaderboard". The UIAlertView also contains a UITextField called username. At the moment the UITextField "username" is covering one of the buttons in the UIAlertView. I just wanted to know how I could stop the UITextField from covering one of the buttons, i.e move the buttons down. Here is an image of what is happening: And here is my code: [username setBackgroundColor:[UIColor whiteColor]]; [username setBorderStyle:UITextBorderStyleRoundRect]; username.backgroundColor = [UIColor clearColor]; username.returnKeyType = UIReturnKeyDone; username.keyboardAppearance = UIKeyboardAppearanceAlert; username.placeholder = @"Enter your name here"; username = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)]; username.borderStyle = UITextBorderStyleRoundedRect; [username resignFirstResponder]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Congratulations" message:[NSString stringWithFormat:@"You tapped %i times in %i seconds!\n", tapAmount, originalCountdownTime] delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:@"Submit To High Score Leaderboard", @"View Leaderboard", nil]; alert.tag = 01; [alert addSubview:username]; [alert show]; [alert release];

    Read the article

  • Use JS to add characters into textfield

    - by Thomas
    I want to add a $ symbol before a users entry into a text field without actually submitting the $ when the user clicks submit. Additionally, I need to prohibit the user from entering anything but numerical values in to the text input. I know about the JQuery input mask (http://www.conetrees.com/2009/03/blog/jquery-masked-input-plugin-increase-usability-for-masked-format-input-fields) but this plugin requires you to set the exact number of digits/letters that the user is supposed to enter, which is no good for my current project. Can anyone think of a way to accomplish what I have described above?

    Read the article

  • Javascript Date Picker Into A Textfield

    - by Dilukshan Mahendra
    I'm trying to use a date picker for a date field but my date fields ID is a dynamic id, since the fields generates in table rows, like <input type="text" id="date<%=n%>"/> But my date picker script requires the ID to attach the date picker into the above text field like below, <script type="text/javascript"> new datepickr('datepick', { dateFormat: 'Y-m-d' }); </script> Is there any other way to make this work?

    Read the article

  • fix needed for bug in TextField/Text

    - by Mark
    Sort of a complicated scenario - just curious if anyone else could come up with something: I have a Text control and when I scroll it and stop the scroll with the cursor over some text that has a url, the cursor doesn't revert to a hand, and also flash player starts acting as if a selection is being made from the last cursor position. So IOW a bonafide bug in flash as far as I can determine. The above probably wasn't completely clear so let me elaborate. If you grab a scrollbar thumb and start moving it up and down, you don't actually have to keep the mouse pointer on the thumb while doing so. When you stop the scroll, the mouse pointer could be outside the browser window, inside your flash application, but not currently on the scroll bar thumb, or wherever. The previously mentioned bug occurs when you stop the scroll with the mouse pointer positioned over text with an html anchor (a hyperlink). At that point the cursor enters into some state of limbo, and doesn't show the url hand pointer, and furthermore acts as if some text selection is taking place from the last cursor position prior to the scroll. So the question would be, what sort of event could I simulate in code to jolt flash out of this erroneous state it is in. And furthermore in what event could I perform this simulated event (given that for example there is no AS3 event to signal the end of a scroll.) To be clear, the Text control in question is on a canvas, and that canvas (call it A) is on another canvas which actually owns the scrollbar, and scrolling takes place by changing the scrollRect of canvas A.

    Read the article

  • Alter text field focus order with jQuery

    - by Akinator
    Hi, I was wondering, if I have text fields displayed so, could I alter the order in which the focus using javascript (preferably jQuery). See this example here. What I mean that when you tab around them, instead on going "one, two, three, four, five" force them to go: "one, two, four, three, five". Thanks in advance!! EDIT: Thanks to all, I didn´t know it was possible with HTML only. Of course if this is the case I´ll go with that. BTW Thanks to all your answers!!! (I`ll upvote the complete ones) but will accept the first one.

    Read the article

  • How do I make my browser brute force an input field?

    - by user210904
    Hi, There's a website I frequent that gives codes such as GD??Q-TPY32-TPTT3-9CM9P-F2QMQ and hints that the ?? is a number and a letter. If you're the first to unlock the code you can redeem the modest prize. So the obvious way to solve this problem is to brute-force the code. But obviously I don't want to sit in front of the computer for an hour to manually input all 10 * 26 combinations. Is there a way for me to tell my browser to input these codes (assume that each 5-character block is an individual text field). Or is there a special browser that enables some sort of macro-type feature? Thanks.

    Read the article

  • rails 3 how to automatically post user_id in column of comments

    - by user568502
    hi, im totally new to rails. here my question: i made an app with articles and comments and use devise for authentication sadly im only able to post 1 hyperlink so this is the middle part of my post with the files at gist: https://gist.github.com/771366 the article_id is pre selected in the comments/_form - but the user_id isnt. i googled a lot, tried value = session[:user_id] and others, but nothing worked would be great if someone could tell me how it works ^^ thx

    Read the article

  • How do I get the year drop down with a textfield

    - by Sanjib Karmakar
    I am creating a domain class named HOLIDAY in grails.I need to have a year dropdown in my Holiday year field. Hear is my domain:- class Holiday extends CategoryMaster { String holidayName Date startDate int year Date dateCreated static constraints = { holidayName(blank:false,nullable:false) } } I need to a year dropdown in year field, Should it come dynamically from a domain method that will discard the month & day and reflect only year in that dropdown adding +50 -50 to that?... How can I get it?

    Read the article

  • insert DropDownList and TextField in Gridview

    - by userk
    HI,I need to create a GridView which DataSource is an object. Depending on the object I may need some columns with DropDownLists or TextFields (but not all rows) As I don't know the number or columns, they have to be dynamic. I found this solution: TemplateField t = new TemplateField(); t.HeaderTemplate = new GridViewTemplate("header", "title"); t.ItemTemplate = new GridViewTemplate("combobox", "val"); GridView1.Columns.Add(t); GridView1.DataSource = ds; GridView1.DataBind(); Where GridViewTemplate extends ITemplate. This didn't work for me, it fills all rows of a column and I had no way to control witch DropDownList and TextFields need to be created (object info). All the DropDownLists need to have an ID also only known by the object. There are some way I can do this?

    Read the article

  • Take input through Buttons in java

    - by stash211
    I understand that the title might not be descriptive enough, but I'm making a magic square game in Java and basically, I'm trying to replicate user input as found in the sudoku game here: http://www.websudoku.com/. What I have is a n x n grid of Buttons (not JButton) as the board and what I want the user to be able to do is when the user clicks on one of the buttons, similar to the game above, it allows the user to type in his guess in the button itself instead of popping up a dialog box with an input field of some sort. I don't know where to start, I am a beginner in Java (not very beginner, but my knowledge with the various Java APIs is very limited), so I'm trying to find out if this would be possible and if it is, how would I go about doing it? Thanks for any help.

    Read the article

  • onKeypress Enter Key event on textfield not working in Chrome

    - by rlcrews
    I have a question along the same vein as the one asked here regarding how the enter key is handled in chrome. The effect I am trying to accomplish is to allow the enter key to call a click event of one a button while focus in within the current field. To accomplish this I am using the following code: javascript: <script type="text/javascript"> //attempting to capture keypress for chrome here but this is not working $("#txtContainer").keypress(function (e) { if (e.keyCode == '13') { e.preventDefault(); doClick(buttonname, e); return false; } }); function doClick(buttonName, e) { var key; if (window.event) key = window.event.keyCode; //IE else key = e.which; //firefox if (key == 13) { var btn = document.getElementById(buttonName); if (btn != null) { btn.click(); event.keyCode = 0 } } } </script> within the aspx <form id="form1" runat="server"> <div> <asp:LinkButton ID="newBtn" runat="server" OnClick="btnLogin_Click" Text="ASP Link" /> <asp:TextBox ID="txtContainer" runat="server" Width="100" /> <asp:Label ID="time_lbl" runat="server" /> </div> </form> and within the code behind aspx.cs protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtContainer.Attributes.Add("onKeyPress", "doClick('" + newBtn.ClientID + "',event)"); } } public void btnLogin_Click(object sender, EventArgs e) { time_lbl.Text = txtContainer.Text; } The above code works fine in FF and IE however chrome continues to submit the entire form vs. capturing the keypress on the enterkey. Thank you for any suggestions.

    Read the article

  • focus() jQuery function doesn't work in Safari, but works fine on all other browsers?

    - by pMan
    I have a search text field and search button, when button is clicked with default text in text field, or null value, an alert pops up and sets focus back on search text field. This works very well on all major browsers but not in safari. I tried it even with out jquery, but didn't work. When the focus falls on search text field, I have another jQuery function, is that the problem. The code that sets focus on search text is: if (defaults.keyword == SEARCH_TIP || defaults.keyword == '') { alert(SEARCH_NULL); $('#store_search_keyword').focus(); return false; } The code on focus is: var search_dom = $('#store_search_keyword'); var search_text = search_dom.val(); search_dom.focus(function(){ if ($(this).val() === SEARCH_TIP) { $(this).val(''); } }); any help is appreciated, thanks..

    Read the article

  • move carat to the end of a text input field AND make the end visible

    - by user322384
    I'm going insane. I have an autosuggest box where users choose a suggestion. On the next suggestion selection the value of the text input box exceeds its size. I can move the carat to the end of the input field crossbrowser, no problem. But on Chrome and Safari I cannot SEE the carat at the end. The end of the text is not visible. Is there a way to move the carat to the end of a text input field AND have the end of the field visible so that the user is not confused about where the input carat went? what I got so far: <html> <head><title>Field update test</title></head> <body> <form action="#" method="POST" name="testform"> <p>After a field is updated the carat should be at the end of the text field AND the end of the text should be visible</p> <input type="text" name="testbox" value="" size="40"> <p><a href="javascript:void(0);" onclick="add_more_text();">add more text</a></p> </form> <script type="text/javascript"> <!-- var count = 0; function add_more_text() { var textfield = document.testform.elements['testbox']; textfield.blur(); textfield.focus(); if (count == 0) textfield.value = ''; // clear old count++; textfield.value = (count ? textfield.value : '') + ", " + count + ": This is some sample text"; // move to the carat to the end of the field if (textfield.setSelectionRange) { textfield.setSelectionRange(textfield.value.length, textfield.value.length); } else if (textfield.createTextRange) { var range = textfield.createTextRange(); range.collapse(true); range.moveEnd('character', textfield.value.length); range.moveStart('character', textfield.value.length); range.select(); } // force carat visibility for some browsers if (document.createEvent) { // Trigger a space keypress. var e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 0, 32); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 0, 32); } textfield.dispatchEvent(e); // Trigger a backspace keypress. e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 8, 0); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 8, 0); } textfield.dispatchEvent(e); } } // --> </script> </body> </html> Thanks

    Read the article

  • can i add textfields in the code other than in the init?

    - by themanepalli
    Im a 15 year old noob to java. I am trying to make a basic program trader that asks for the stock price, the stock name, the stock market value and the type of order. Based on the type of order, i want a new textfield to appear. do i have to add the textfield in the init first or can i do it in the action performed. I googled someother ones but they are a little too complicated for me. heres my code. import java.awt.*; import java.applet.*; // import an extra class for the ActionListener import java.awt.event.*; public class mathFair extends Applet implements ActionListener { TextField stockPrice2; TextField stockName2; TextField orderType2; TextField marketValue2; TextField buyOrder2; TextField sellOrder2; TextField limitOrder2; TextField stopLossOrder2; Label stockPrice1; Label stockName1; Label orderType1; Label marketValue1; Label buyOrder1; Label sellOrder1; Label limitOrder1; Label stopLossOrder1; Button calculate; public void init() { stockPrice1 = new Label ("Enter Stock Price:"); stockName1 = new Label ("Enter Name of Stock: "); orderType1 = new Label ("Enter Type of Order: 1 for Buy, 2 for Sell, 3 for Stop Loss, 4 for Limit"); marketValue1= new Label("Enter The Current Price Of The Market"); stopLossOrder1 = new Label ("Enter The Lowest Price The Stock Can Go"); limitOrder1 = new Label ("Enter The Highest Price The Stock Can Go"); stockPrice2 = new TextField (35); stockName2 = new TextField (35); orderType2 = new TextField (35); marketValue2= new TextField(35); calculate= new Button("Start The Simulation"); add (stockPrice1); add (stockPrice2); add (stockName1); add (stockName2); add (marketValue1); ; add(marketValue2); add (orderType1); add (orderType2); add(calculate); ; calculate.addActionListener(this); } public void actionPerformed (ActionEvent e) { String stock= stockPrice2.getText(); int stockPrice= Integer.parseInt(stock); stockPrice2.setText(stockPrice +""); String marketV= marketValue2.getText(); int marketValue= Integer.parseInt(marketV); marketValue2.setText(marketValue+""); String orderT= orderType2.getText(); int orderType= Integer.parseInt(orderT); orderType2.setText(orderType+""); if((e.getSource()==calculate)&& (orderType==1)) { buyOrder2= new TextField(35); buyOrder1 = new Label("Enter Price You Would Like To Buy At"); add(buyOrder2); add(buyOrder1); } else if((e.getSource()==calculate)&& (orderType==2)) { sellOrder2= new TextField(35); sellOrder1 = new Label("Enter Price You Would Like To Sell At"); add(sellOrder2); add(sellOrder1); } else if((e.getSource()==calculate)&& (orderType==3)) { stopLossOrder2= new TextField(35); stopLossOrder1=new Label("Enter The Lowest Price The Stock Can Go"); add(stopLossOrder2); add(stopLossOrder1); } else if((e.getSource()==calculate)&& (orderType==4)) { limitOrder2=new TextField(35); limitOrder1= new Label("Enter the Highest Price The Stock Can Go"); add(limitOrder2); add(limitOrder1);; } } }

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >