Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox transparancy 3

Status
Not open for further replies.

Koen Piller

Programmer
Jun 30, 2005
841
NL
Hi,

I would like to have a textbox with transparent background. So:

SetBackstyle = 0
Placed this box over a label with a format indication dd-mm-yyyy
Label.Backstyle = 1
Yet the label is not showing, what am I missing here?

rgds,

Jockey(2)
 
Olaf said:
can't remember you're asked for login name or email? You can clearly read what to enter right before entering, if you tab into the control before you read the placeholder text, is that really the site's problem?

Yes. It's the site's problem. UX should be intuitive and discover-able. Disappearing elements are not discover-able.

Now, on the top topic of login name or email ... how about sites asking for your login ID but what they really want is your email? [3eyes] If you want an email address then ask for a dang email address AND DON'T DISAPPEAR THE PROMPT.
 
Before you login you register, and if you register with your mail as your login (quite common today) then I don't see a problem being prompted for the login ID and enterying my mail.

Anyway, on topic again, yet another idea, Jockey:

If you're satisfied with the label disappearing when a user types (I though of partial disappearance, since the label shows the format), you could simply set the value to the text mm-dd-yyyy and change to {} in gotfocus, if the user tabs away and the date is incomplete/invalid or empty you can revert back to mm-dd-yyyy.

There are so many ways to tell the user the format and support him to enter it, I wonder why you didn't came up with one or to in the meantime.

Bye, Olaf.
 
Olaf,
> I wonder why you didn't came up with one or to in the meantime
who says? I had a question: why is it that on a textbox the property background=0=transparent does not show. It seems this is just a feature, so be it.

I was looking for a neat solution to show the required date format in a multiusable search box
I am quit satisfied with the solution I have implented in this particular case. Objective: show user the required format when entering a date in a multiusable searchbox, with a minimum of coding.

Various solutions did came up to me, the most preferable one would be to implent a datapicker, since the application has no datepicker class I had to introduce one, which would mean a lot more coding than a simple label.
To 'hazzle' around with the datesettings was also an option, however I opted for the label.
If someone could convince me the use of this (label) technique is not user friendly than I 'surrender' and will implent one of the other solutions. Sofar it has not been. Just in case you are interested I could post a video to show you a real live.

Still willing to learn from more experienced users and always on the search for an extreme friendly UI.

Rgds,

Jockey(2)
 
Take alone the drift of the topic to the real problem. It's a bad sign on its own, that you come here with a detail problem instead of the real problem.

The ideal solution to your idea to show the format inside of the textbox would let it stay in there when the date is typed and the digits of the date would replace the format mask just partially. That's impossible to do with just one forecolor and would be much work with a label you keep in front of the textbox, a label in the back would be semi ideal, as it still would make the entered digits less readable, even if they are in front and in black instead of light grey. Just think about how unreadable labels get due to the cleartype bug washing up the edges of letters.

The ideal solution would overlay the mask with the partly entered value, which would need quite some code, though, because we can only work with a label on top of the textbox. You can make it a little simpler by using a monospaced font, but that's still quite some effort to make the perfect overlay.

I agree with the need of a simple solution, and that would be either the datepicker, but that's also normally adding some more effort, a simple label aside or above the textbox showing the format in its caption or the format displayed within the textbox, vanishing when you enter it. I already said I partially disagree with Craigs criticism about the placeholder text, the advantage of needing less space is better then the disadvantage to not see the placeholder during entry. In the normal case the placeholder text is a tip text and not a input mask anyway, it would be quite useless to let it stay in the control, even if it would be overwritten partially.

A mainly blank form is well designed, as it can be a resting place for the eye and the demand of users to make use of any available space and put in this and that display or input in there is making me sick. Therefore I really like the idea of the placeholder, even in forms having lots of space for labels aside of controls. It's a matter of nil effort to have popups or other form parts coming up just in time and users are even used to this concept when it comes to comboboxes or datepickers or file pickers. So overall gaining space by not needing a label is a good idea to me, not a bad idea. There's one little detail, that might be better: The placeholder text could stay as long as you just put the text cursor in the box and not yet start typing, but it's merely getting used to read a control before tabbing into it. The problem of a control asking for a login id when asking for an email is not a problem of where and when this placeholder, tip text or label caption is displayed, it's a separate problem about the semantics and value of the tip text. The criticism would stay, if you write it as normal label caption aside of the entry textbox, wouldn't it?

Bye, Olaf.
 
Olaf,

Thanks for you valuable thoughts, I will and take them into consideration.

Trust you can live with my solution, since your
Olaf said:
a simple label aside or above the textbox showing the format in its caption or the format displayed within the textbox, vanishing when you enter it
.
I have put it in = on top of the textbox.


Rgds,

Jockey(2)


 
Well, you're quoting two solutions. One using a normal label as with most any data entry control, describing what to enter. A label on top was something I suggested earlier, but it's simpler to write the text in the textbox.value, isn't it? You can change it to empty in gotfocus and have the same effect as a label you move away on click, with less effort.

Bye, Olaf.

 
More and more UX experts are coming out against doing this in a textbox because it isn't discoverable. Anything that the user sees or does should be questioned "How does this affect the user? From their view is this good or bad? Does it make things harder or easier for the user?"

If you're screen is so packed with data that you don't have space for a prompt next to the textbox, there is probably too much on the screen. The user can't possibly absorb all that information at once. KISS principle comes into play here.

Craig Berntson
.Net MVP, Author, Tech Presenter
 
There is probably too much on the screen. The user can't possibly absorb all that information at once.

Exactly what I said. I have never said I convert all label texts into placeholders, I said
A mainly blank form is well designed, as it can be a resting place for the eye and the demand of users to make use of any available space and put in this and that display or input in there is making me sick.

So to add to what I already said, this is no solution to quench even more onto a form already packed too full, but it's a nice thing to get a 50% empty for to even 75% emptyness.

Bye, Olaf.
 
Olaf,

You gave 2 solutions (in fact 3)
Olaf said:
a simple label aside or above the textbox showing the format in its caption or the format displayed within the textbox
and I had opted for one of these so I believe we are on the same track aren't we?

rgds,

Jockey(2)



 
It doesn't matter much how you do the " the format displayed within the textbox", but I revoked my idea to use an extra label for it, since you can simply set textbox.value="dd-mm-yyyy" until the first gotfocus. Do you read it this time?

Bye, Olaf.
 
Olaf,
Yes I do read you.
Your suggestion of settings the value to 'dd-mm-yyyy' as already done on 21st september as later on reviewed (23rd) with the label in or above/underneath. I took this as an example of progressive insight. Afterall since I was looking for a simple hint to the users which format I expected on the textbox when receiving a date I opted for the label. (I had rejected the tooltip since that comes up too late)
Thanks for sharing your opinion with me.
Rgds,
Jockey(2)
 
You still don't read me, I advanced the idea and already proposed something even simpler for 3 posts now:
You don't need any label control, you can initially set the textbox.value itself to 'dd-mm-yyyy'. That's a simplification of the needed objects and dependencies, isn't it? To profit from the automatic date validation you can set the textbox.value to the empty date {} at GotFocus.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top