SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member oberon's Avatar
    Join Date
    Jan 2003
    Location
    Moscow Region, Russia
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Input text background

    Is it possible to set a custom background color for the input text, instead of the default white?

    Thanx

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using Flash MX? If so,

    This would set the background color of text field whose instance name is "TextField" to red or FF0000.
    Code:
    TextField.backgroundColor = 0xFF0000;

  3. #3
    SitePoint Member oberon's Avatar
    Join Date
    Jan 2003
    Location
    Moscow Region, Russia
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    There is another way also....

    Yeah, thanks!

    But this approach has two disadvantages (well, relative). The first is that you see what you get at run time only and at design time there are annoying white textboxes. The second is that it works in MX only.

    I found an unbelievably simple workaround for this which is universal. I just put a borderless input on top of a color folled rectangle. This way I can even play with the borders of the rectangle...

    Thank you for stimulating my thinking!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •