# Use of Text Field 

**URL:** <https://forum.xojo.com/t/use-of-text-field/19920>\
**Category:** Getting Started\
**Created:** [October 22, 2014, 11:49am UTC](https://forum.xojo.com/t/use-of-text-field/19920 "2014-10-22T11:49:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adesiyan\_Aderemi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@Adesiyan\_Aderemi](https://forum.xojo.com/u/Adesiyan_Aderemi)\
**Post date:** [October 22, 2014, 11:49am UTC](https://forum.xojo.com/t/use-of-text-field/19920/1 "2014-10-22T11:49:09Z")

</div>

Working on a webapp,I have 10 visible textfield that the end user can use but I want the user to have the the priviledge of using more than 10 visible textfield by click on my ADDBUTTON and have as many as the user desire to use. What line of code can I use in my Addbutton action?

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [October 22, 2014, 12:19pm UTC](https://forum.xojo.com/t/use-of-text-field/19920/2 "2014-10-22T12:19:47Z")

</div>

> [@137072:@Adesiyan Segun](#):
>
> Working on a webapp,I have 10 visible textfield that the end user can use but I want the user to have the the priviledge of using more than 10 visible textfield by click on my ADDBUTTON and have as many as the user desire to use. What line of code can I use in my Addbutton action?

Put your textfield in a WebContainer and use the New statement and embedwithin to add to your page. See example at the bottom of the page  
[http://documentation.xojo.com/index.php/WebContainer](http://documentation.xojo.com/index.php/WebContainer)

---

<div class="post-metadata">

**Author:** ![Adesiyan\_Aderemi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@Adesiyan\_Aderemi](https://forum.xojo.com/u/Adesiyan_Aderemi)\
**Post date:** [November 14, 2014, 2:50am UTC](https://forum.xojo.com/t/use-of-text-field/19920/3 "2014-11-14T02:50:24Z")

</div>

Thanks so much,mr Michel Bujardet and all other friends but the app still not giving what I expected the text field to do.I want the end user of the text field to click on my add button and have more of the text field to use even up to a million text field or more than that. Unlimited text field for the end user,that is what I want the app to do,how do I go about this?

With check box cheked,I want the password field to show the text character that is show password text,what can I do with check box to give me this result?

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [November 14, 2014, 11:31am UTC](https://forum.xojo.com/t/use-of-text-field/19920/4 "2014-11-14T11:31:16Z")

</div>

Good luck 😕

---

<div class="post-metadata">

**Author:** ![Tanner\_Lee1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@Tanner\_Lee1](https://forum.xojo.com/u/Tanner_Lee1)\
**Post date:** [November 16, 2014, 3:51am UTC](https://forum.xojo.com/t/use-of-text-field/19920/5 "2014-11-16T03:51:05Z")

</div>

Here’s some simple code to show/hide the password. It’s called from the the texfield itself, but easy enough to add to a different contol’s events.

In mouseenter:

`me.text = mPassword
 RaiseEvent MouseEnter`

in mouseexit:

`me.text = left("", me.mData.len)
RaiseEvent MouseExit`

---

<div class="post-metadata">

**Author:** ![Richard\_Duke](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_duke/32/246_2.png) [@Richard\_Duke](https://forum.xojo.com/u/Richard_Duke)\
**Post date:** [November 16, 2014, 4:20pm UTC](https://forum.xojo.com/t/use-of-text-field/19920/6 "2014-11-16T16:20:53Z")

</div>

[quote=143679:@Tanner Lee]Here’s some simple code to show/hide the password. It’s called from the the texfield itself, but easy enough to add to a different contol’s events.

In mouseenter:

`me.text = mPassword
 RaiseEvent MouseEnter`

in mouseexit:

`me.text = left("", me.mData.len)
RaiseEvent MouseExit`[/quote]

what is this mPassword and mData??

---

<div class="post-metadata">

**Author:** ![Tanner\_Lee1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@Tanner\_Lee1](https://forum.xojo.com/u/Tanner_Lee1)\
**Post date:** [November 16, 2014, 5:37pm UTC](https://forum.xojo.com/t/use-of-text-field/19920/7 "2014-11-16T17:37:43Z")

</div>

They’re local properties of my subclass. But never mind, there’s an easier way for you to this.

In your checkbox action event add:

```auto
TextField1.Password = not TextField1.Password
```

This will alternate between plain and hidden text.

---

<div class="post-metadata">

**Author:** ![Richard\_Duke](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_duke/32/246_2.png) [@Richard\_Duke](https://forum.xojo.com/u/Richard_Duke)\
**Post date:** [November 16, 2014, 5:50pm UTC](https://forum.xojo.com/t/use-of-text-field/19920/8 "2014-11-16T17:50:00Z")

</div>

i want to use it in my subclass for textarea. So how do i put value into mData and mPassword?

---

<div class="post-metadata">

**Author:** ![Tanner\_Lee1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@Tanner\_Lee1](https://forum.xojo.com/u/Tanner_Lee1)\
**Post date:** [November 16, 2014, 7:20pm UTC](https://forum.xojo.com/t/use-of-text-field/19920/9 "2014-11-16T19:20:26Z")

</div>

Richard, here’s a project that demonstrates the two techniques.

[passwords.xojo\_binary\_project.zip](https://www.dropbox.com/sh/aqi4br8n5elxmxq/AAA0mYqL-3U_GpJj-ecEnZLRa?dl=0)

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:27pm UTC](https://forum.xojo.com/t/use-of-text-field/19920/10 "2020-10-29T17:27:54Z")

</div>


