Search Results

Search found 3025 results on 121 pages for 'textbox'.

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

  • From AutoComplete textbox to database search and display?

    - by svebee
    Hello everyone, I have a small problem so I would be grateful if anyone could help me in any way. Thank you ;) I have this little "application", and I want when someone type in a AutoComplete textbox for example "New" it automatically displays "New York" as a option and that (AutoComplete function) works fine. But I want when user type in full location (or AutoComplete do it for him) - that text (location) input is forwarded to a database search which then searches through database and "collects" all rows with user-typed location. For example if user typed in "New York", database search would find all rows with "New York" in it. When it finds one/more row(s) it would display them below. In images... I have this when user is typing... http://www.imagesforme.com/show.php/1093305_SNAG0000.jpg I have this when user choose a AutoComplete location (h)ttp://www.imagesforme.com/show.php/1093306_SNAG0001.jpg (remove () on the beggining) But I wanna this when user choose a AutoComplete location (h)ttp://www.imagesforme.com/show.php/1093307_CopyofSNAG0001.jpg (remove () on the beggining) Complete Code package com.svebee.prijevoz; import android.app.Activity; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import android.widget.TextView; public class ZelimDoci extends Activity { TextView lista; static final String[] STANICE = new String[] { "New York", "Chicago", "Dallas", "Los Angeles" }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.zelimdoci); AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_item, STANICE); textView.setAdapter(adapter); lista = (TextView)findViewById(R.id.lista); SQLiteDatabase myDB= null; String TableName = "Database"; String Data=""; /* Create a Database. */ try { myDB = this.openOrCreateDatabase("Database", MODE_PRIVATE, null); /* Create a Table in the Database. */ myDB.execSQL("CREATE TABLE IF NOT EXISTS " + TableName + " (Field1 INT(3) UNIQUE, Field2 INT(3) UNIQUE, Field3 VARCHAR UNIQUE, Field4 VARCHAR UNIQUE);"); Cursor a = myDB.rawQuery("SELECT * FROM Database where Field1 == 1", null); a.moveToFirst(); if (a == null) { /* Insert data to a Table*/ myDB.execSQL("INSERT INTO " + TableName + " (Field1, Field2, Field3, Field4)" + " VALUES (1, 119, 'New York', 'Dallas');"); myDB.execSQL("INSERT INTO " + TableName + " (Field1, Field2, Field3, Field4)" + " VALUES (9, 587, 'California', 'New York');"); } myDB.execSQL("INSERT INTO " + TableName + " (Field1, Field2, Field3, Field4)" + " VALUES (87, 57, 'Canada', 'London');"); } /*retrieve data from database */ Cursor c = myDB.rawQuery("SELECT * FROM " + TableName , null); int Column1 = c.getColumnIndex("Field1"); int Column2 = c.getColumnIndex("Field2"); int Column3 = c.getColumnIndex("Field3"); int Column4 = c.getColumnIndex("Field4"); // Check if our result was valid. c.moveToFirst(); if (c != null) { // Loop through all Results do { String LocationA = c.getString(Column3); String LocationB = c.getString(Column4); int Id = c.getInt(Column1); int Linija = c.getInt(Column2); Data =Data +Id+" | "+Linija+" | "+LocationA+"-"+LocationB+"\n"; }while(c.moveToNext()); } lista.setText(String.valueOf(Data)); } catch(Exception e) { Log.e("Error", "Error", e); } finally { if (myDB != null) myDB.close(); } } } .xml file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="20sp" android:gravity="center_horizontal" android:padding="10sp" android:text="Test AutoComplete"/> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="AutoComplete" /> <AutoCompleteTextView android:id="@+id/autocomplete_country" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp"/> </LinearLayout> </LinearLayout>

    Read the article

  • Focus-dependent text change for TextBoxes in WPF

    - by Simon
    Hey there. I'm writing an application in WPF using the MVVM-pattern and will really often use TextBoxes. I don't want to use labels for the user to know user what the text box is for, i.e. I don't want something like this: <TextBlock> Name: </TextBlock> <TextBox /> Instead, I would like the TextBox to contain its own label. Statically, you would express it like this: <TextBox>Name</TextBox> If the cursor is displayed in the textbox, i.e. the TextBox gains focus, I want the description text to disappear. If the TextBox is left empty and it loses the focus, the description text should be shown again. It's similar to the search textbox of StackOverflow or the one of Firefox. (please tell me if your not sure what I mean). One TextBox's label may change at runtime, dependending on e.g. a ComboBox's selected element or a value in my ViewModel. (It's like in Firefox's search TextBox, if you select google from the search engins' menu, the TextBox's label changes to "Google", if you select "Yahoo" its set to "Yahoo"). Thus I want to be able to bind the label's content. Consider that I may already have a Binding on the Text-Property of the TextBox. How can implement such a behaviour and make it reusable for any of my TextBox's? Code is welcome but not needed; a description of what to do is enough. Thank you in advance.

    Read the article

  • How do I call a Asp.Net textbox in CSS?

    - by mw
    I hope this isn't too difficult, obviously you can call HTML tags such as fieldset, label and legends and also textboxes. However how does one call an asp:textbox, i have tried just textbox, asp:textbox, input.textbox but nothing seems to work. This is something that should be really straight forward to do and I can't waste any more time figuring it out. Thanks.

    Read the article

  • Textbox OnTextChanged and Button Click Event Not Firing

    - by goodwince
    I have textboxes being generated by a repeater that use OnTextChanged with autopostback enabled so that I can know when when the values change. This all works perfect. The problem starts when I try to click on any buttons on the page. The loss of focus triggers the event for the OnTextChanged; however, the event for my buttons never get fired. I checked this in the debugger and while debugging if I put a break-point in the page_load it will call both; however, without the break-point it still only calls the OnTextChanged event. I found this post on JavaScript. If my problem is also JavaScript related, why does the clicking of the button fire in debug mode? Thanks.

    Read the article

  • Brute force characters into a textbox in c#

    - by Fred Dunly
    Hey everyone, I am VERY new to programming and the only language I know is C# So I will have to stick with that... I want to make a program that "test passwords" to see how long they would take to break with a basic brute force attack. So what I did was make 2 text boxes. (textbox1 and textbox2) and wrote the program so if the text boxes had the input, a "correct password" label would appear, but i want to write the program so that textbox2 will run a brute force algorithm in it, and when it comes across the correct password, it will stop. I REALLY need help, and if you could just post my attached code with the correct additives in it that would be great. The program so far is extremely simple, but I am very new to this, so. Thanks in advance. private void textBox2_TextChanged(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { if (textBox2.Text == textBox1.Text) { label1.Text = "Password Correct"; } else { label1.Text = "Password Wrong"; } } private void label1_Click(object sender, EventArgs e) { } } } `

    Read the article

  • NSIS Check Textbox empty not working

    - by Hernán
    I'm trying to display a page in NSIS to obtain two different values. I want both to be not empty. The page actually displays altough I can't get my page leave function to check properly for empty fields. Function CCInstallOpts ReserveFile "cc_installopt.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "cc_installopt.ini" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "cc_installopt.ini" FunctionEnd My page leave function where I validate fields (4 and 5 ) is : Function CCInstallOptsLeave Push $R0 Push $R1 !insertmacro MUI_INSTALLOPTIONS_READ $R0 "cc_installopt.ini" "Field4" "State" !insertmacro MUI_INSTALLOPTIONS_READ $R1 "cc_installopt.ini" "Field5" "State" StrCmp $R0 "" mustcomplete StrCmp $R1 "" mustcomplete StrCpy $CC_CyberID $R0 StrCpy $CC_VCode $R1 goto exitfunc mustcomplete: MessageBox MB_OK|MB_ICONEXCLAMATION "Empty not allowed" Abort exitfunc: Pop $R1 Pop $R0 FunctionEnd Note that I want to store the entered values into $CC_VCode and $CC_CyberID variables to be later used on different files (I've defined both as:) Var /GLOBAL CC_VCode Var /GLOBAL CC_CyberID Thanks in advance.

    Read the article

  • WPF TextBox Custom Dictionary Support

    - by Tom Allen
    Has anyone found a workaround yet for getting custom dictionary support working for the built in spellchecking on WPF TextBoxes/RichTextBoxes? We've been probing the spelling stuff with reflector hoping to find where the dictionary entries are coming from, but it's looking very much like it's going to be a COM object.... I know it's not currently supported and that Microsoft were looking into supporting it in a future release, but that was quite a while ago and I can't seem to find any recent news about it. Clutching at staws, I've posted a suggestion up on Connect: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=470233

    Read the article

  • TextBox and Thread

    - by gloris
    Why doesn't this work? The program stops on: this.textBox1.Text = "(New text)"; Thread demoThread; private void Form1_Load(object sender, EventArgs e) { this.demoThread = new Thread(new ThreadStart(this.ThreadProcUnsafe)); this.demoThread.Start(); textBox1.Text = "Written by the main thread."; } private void ThreadProcUnsafe() { while (true) { Thread.Sleep(2000); this.textBox1.Text = "(New text)"; } }

    Read the article

  • how to pass Html.TextBox to controller?

    - by sam26092004
    May be this simple. But, I've hard time figuring it out. I've a controller with different actions that calls the DB code and return result. I want to pass the value of text box to different actions in controller. How to do it? I know that, I can pass values by using form. But, I don't to know how to call different actions in controller from single view.

    Read the article

  • Javascript wont change value in TextBox

    - by mattgcon
    Here is my javascript function AppendValues(e) { var lghtcnt = 0; var vars = e.id.split(';'); var highcnt = false; var lghtid = ""; var maxltcnt = 100; for (var x = 0; x < vars.length; x++) { var tokens = vars[x].split('|'); var pram = tokens if (tokens[0] == "ID"){ lghtid = tokens[1]; } if (tokens[0] == "LTC"){ var itemcnt = 0; var currentcnt = 0; currentcnt = parseInt(tokens[1].toString()); var txtid = document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]); if (e.checked) { totallightcnt += currentcnt; if (totallightcnt > maxltcnt) { document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = 0; alert('This puts you over the limit of 100 total lights, please make adjustments.'); break; } document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = currentcnt.toString(); } else { totallightcnt -= currentcnt; document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = 0; break; } } if (highcnt) { break; } } } Here is the issue, when I check the value it DOES say theupdated value but it does not display to the user on the webpage. What could be the issue?

    Read the article

  • TextBox Borders in Reporting Services (Report Builder 3.0)

    - by ChrisHDog
    I have a report that I am creating in Report Builder 3.0 that I appear unable to set the color value (or any value) on TextBoxes Borders. I have a list that I have added a text box to. I then click on the text box and select Text Box Properties ... then click Border, the value for Color: is Black. If I change this value to anything else and then click OK, then come back into Text Box properties it is set back to Black. Any idea what is going on here? Is this not the correct way to set a border color?

    Read the article

  • Newline not showing correctly in textbox

    - by TheGateKeeper
    I am loading a string from my database which among other things contains line breaks (\r\n). However, this isn't being rendered as a new line but instead as \r\n. If I type it directly in instead of loading it from a string, it works just fine but I need to be able to load it from a string. Any ideas? Edit: Upon closer inspection, it looks like the string is being returned as: Changed test7\\r\\nChanged test8\\r\\nChanged test9Changed test7 From the database. I tried running a .Replace(@"\\", @"\") on it but this had no effect at all. Any ideas?

    Read the article

  • TextBox Label Control

    - by j-t-s
    Hi All I am not worried about whether this is in Winforms or WPF. Is there ANY way at all that I could develop my own user control like the one found in Microsoft Paint, below: If you can't see the pic above, it's here: http://img232.imageshack.us/i/txtboxlblctrl.png/ Is there anyway at all I can do something like this in C#? Thank you

    Read the article

  • Samsung Galaxy tab Textbox issue

    - by csharpnewbie
    We are working on a mobile web application( .NET based). We are facing an issue in Samsung galaxy tab text box. Pls find below the details. Let me know if you need more details. Problem in Samsung tab 750 We have a login screen where we focus on the input text box the Samsung tab keypad pops up and the design is completely collapsed. And the same is working fine in iPad. Wanted to check any settings or CSS property to fix this issue. ![After tapping on the text box]

    Read the article

  • Unwanted Retriggering of Textbox Events

    - by user348917
    This is one of those "seems obvious" as how to do, but came across interesting side effect in implementing. I'm trying to keep two text boxes syncronized when information is updated. In this example, I will be using txtStartDate and txtEndDate. If the txtStartDate is changed, then the txtEndDate should should be updated. Likewise, if the txtEndDate changes, I want the txtSartDate to be updated. The side effect I'm comming across is that when I set them up under the TextChanged event for both, the events seem to retrigger against each other indefinately (endless loop?). Am I using the wrong event? Is this a task for a delegate?

    Read the article

  • How to set selected index of dropdown to 0 when text of textbox is changed?

    - by Devashri
    Hi, I am using a dropdown to populate a textbox. But if preferred value is not present in dropdown then user directaly enter value in that textbox. If user selects value from dropdown first and then he don't want that value and he types another text in that textbox then at this time the dropdown should be set to index 0 as user is typing another value. I used textchanged event of textbox but it is not working. Can anyone tell me how to write javascript for this? Thanks in advance.

    Read the article

  • Using an HTML Textbox in place of an ASP.NET TextBox

    - by Velika
    If I add this to the ASPX page: <input id="Text1" type="text" value="Text1Value" /> I would expect to see "Text1" in the list of Request Form keys even WITHOUT setting the runat=Server property. ? request.Form.AllKeys I realize that if I do set that propery, then I will have a server-sided HTML control that I can reference using the name "Text1," but shouldn't I be able to access the text in the text box using the following VB.NET syntax? request.Form("Text1")

    Read the article

  • Watermark TextBox for Windows Phone

    - by Daniel Moth
    In my Translator by Moth app, in the textbox where the user enters a translation I show a "prompt" for the user that goes away when they tap on it to enter text (and returns if the textbox remains/becomes empty). See screenshot on the right (or download the free app to experience it). Back in June 2006 I had shown how to achieve this for Windows Vista (TextBox prompt), and a month later implemented a pure managed version for both desktop and Windows Mobile: TextBox with Cue Banner. So when I encountered the same need for my WP7 app, the path of least resistance for me was to convert my existing code to work for the phone. Usage: Instead of TextBox, in your xaml use TextBoxWithPrompt. Set the TextPrompt property to the text that you want the user to be prompted with. Use the MyText property to get/set the actual entered text (never use the Text property). Optionally, via properties change the default centered alignment and italic font, for the prompt text. It is that simple! You can grab my class here: TextBoxWithPrompt.cs Note, that there are many alternative (probably better) xaml-based solutions, so search around for those. Like I said, since I had solved this before, it was easier for my scenario to re-use my implementation – this does not represent best practice :-) Comments about this post welcome at the original blog.

    Read the article

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