simple question textbox to textbox

i am working with one form, i want the text inputed by a user from one textbox to be displayed in another read-only textbox

thanks for your time




Answer this question

simple question textbox to textbox

  • Gabriel Lozano-Moran

    Hi,

    maybe something like this

    Private Sub inputTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles inputTextBox.TextChanged
       
    readonlyTextBox.Text = inputTextBox.Text
    End Sub

    Andrej



  • SunilN

    Yes, ToString is necessary since the type of the text property is string, whereas I expect the type of the URL is probably URL or similar.

  • Godai B

    Nevermind it was a misuse of quotes.


  • kymaita

    after reading this, how do you make a read-only textbox (is it some property...if so, which )


  • newtoc#484467

    and if it wasnt read only...any text commands for the textbox would not be implemented

    because in debugging, a non read only textbox displayed the correct text, but after published, it did not work....


  • Telos

    I'm not sure what you mean... What didn't work

    If ReadOnly property is set to False, a user can enter the text in the textbox and you can change the same text from code. But if Readonly propery is True, user can't enter the text, but you can still change the text from code (by using textbox.Text property).

    Andrej



  • Jkat98

    Yes there almost definetly is a value.

    The value is WindowsApplication1.Form1.Webbrowser1.URL.ToString()

    (btw is the to string necessary ...i get an error without it...)

    In debugging, it correctly displays the webbrowser's URL...

    But when you publish the application (make an external build) it does not function as successfully as it did in debugging.





  • AbhijeetRaje

    Yes, it's the ReadOnly property, which you set to True. Note that this way, the textbox is readonly only for the user - you can still set its text in code.

    Andrej



  • montechristo

    in debugging the text i have set for textbox.text shows, but after publishing it does not show up..


  • PDav

    It's hard to say what's going on without having some more information. If by publishing you're referring to ClickOnce Deployment, I'd say it was some kind of security issue...

    What's the text you're assigning to the textbox Where are you getting it from What's the condition for setting it Can you confirm that actually is some value in the text string, before you assing it to the textbox (You can check that by showing it in a message box or something...)

    Andrej



  • simple question textbox to textbox