# \[TextField\] put a constant in the format field in the IDE ?

**URL:** <https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783>\
**Category:** General\
**Created:** [December 4, 2016, 5:54pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783 "2016-12-04T17:54:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [December 4, 2016, 5:54pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783/1 "2016-12-04T17:54:20Z")

</div>

Hi Group,

I just tried to insert a constant and a # just before it in the format field of a textfield.  
it does not replace the constant in the format property (not in the ide and not at runtime)

is it a bug, or a future release, or not possible ?

thanks.

---

<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:** [December 4, 2016, 6:03pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783/2 "2016-12-04T18:03:42Z")

</div>

You mean in the Inspector field ? It maybe an issue since # is also used as placeholder.

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [December 4, 2016, 6:12pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783/3 "2016-12-04T18:12:33Z")

</div>

could be handy to have a constant to store all the format of the fields in one app …

---

<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:** [December 4, 2016, 6:16pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783/4 "2016-12-04T18:16:08Z")

</div>

Well, it does not seem terribly difficult to do in code.

It could indeed be convenient, even for instance to have different numbers and date presentation depending on locale.

---

<div class="post-metadata">

**Author:** ![Eli\_Ott](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/5f8ce5/32.png) [@Eli\_Ott](https://forum.xojo.com/u/Eli_Ott)\
**Post date:** [December 4, 2016, 6:55pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783/5 "2016-12-04T18:55:15Z")

</div>

> [@301446:@Jean-Yves Pochez](#):
>
> could be handy to have a constant to store all the format of the fields in one app …

You could create a subclass and set the format in the open event.

---

<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, 6:34pm UTC](https://forum.xojo.com/t/textfield-put-a-constant-in-the-format-field-in-the-ide/34783/6 "2020-10-29T18:34:10Z")

</div>


