f



Windows 7 style Text Fields backgound text

Hi

is there a way to get a background text in entry fields (text
presenters) in the entry area itself - that disappears when you start
typing - i.e. Windows 7 style.

(Is there any special name / buzzword for that feature ?)

Regards
Sanjay
0
Sanjay
3/4/2010 10:58:54 AM
comp.lang.smalltalk.dolphin 3769 articles. 0 followers. Post Follow

4 Replies
1012 Views

Similar Articles

[PageSpeed] 49

Sanjay,

>is there a way to get a background text in entry fields (text
>presenters) in the entry area itself - that disappears when you start
>typing - i.e. Windows 7 style.

If you don't mind the test being selected then this should work.  

Select all the following and evaluate in a workspace...

sh := Shell show.
sh view addSubView: (te := TextEdit new).

te 
	setFocus;
	value: 'fred';
	selectionRange: (1 to: -1).

-----------------------

If you want the initial text to disappear when the TextEdit gains
focus (which seems to be one possible "Windows 7 style") then ...

sh := Shell show.
sh view addSubView: (te := TextEdit new).

te when: #focusGained send: #value: to: te withArguments: #('').
te value: 'fred'

-----------------------

If you want the initial text to disappear when something is typed in
the TextEdit then you might have to resort to subclassing TextEdit and
overriding #onKeyTyped (or #updateModel or #something ...).   I
haven't explored this though, so ask again if this is what you want.

Ian
-- 
The From address is valid
0
IanB
3/4/2010 8:40:51 PM
Ian,

actually it is the last effect I am looking for

i.e. text appears grey, disappears when you start typing but reappears
if you have not typed anything (even if backspaced to position 0)

In general can Win 7 effects in Controls (transparent properties etc)
be easily made available. (in fact as of now even I have not exlored
all that I may want ... but this is a generic question)

Regards
Sanjay


On Mar 5, 1:40=A0am, IanB <cont...@sunhillow.eu> wrote:
> Sanjay,
>
> >is there a way to get a background text in entry fields (text
> >presenters) in the entry area itself - that disappears when you start
> >typing - i.e. Windows 7 style.
>
> If you don't mind the test being selected then this should work. =A0
>
> Select all the following and evaluate in a workspace...
>
> sh :=3D Shell show.
> sh view addSubView: (te :=3D TextEdit new).
>
> te
> =A0 =A0 =A0 =A0 setFocus;
> =A0 =A0 =A0 =A0 value: 'fred';
> =A0 =A0 =A0 =A0 selectionRange: (1 to: -1).
>
> -----------------------
>
> If you want the initial text to disappear when the TextEdit gains
> focus (which seems to be one possible "Windows 7 style") then ...
>
> sh :=3D Shell show.
> sh view addSubView: (te :=3D TextEdit new).
>
> te when: #focusGained send: #value: to: te withArguments: #('').
> te value: 'fred'
>
> -----------------------
>
> If you want the initial text to disappear when something is typed in
> the TextEdit then you might have to resort to subclassing TextEdit and
> overriding #onKeyTyped (or #updateModel or #something ...). =A0 I
> haven't explored this though, so ask again if this is what you want.
>
> Ian
> --
> The From address is valid

0
Sanjay
3/6/2010 12:51:33 PM
Sanjay,

>actually it is the last effect I am looking for

A wander through MSDN came up with ...

sh := Shell show.
sh view addSubView: (te := TextEdit new).

te 
	sendMessage: 16r1501 "EM_SETCUEBANNER"
	wParam: true asParameter
	lParam: 'Name ???' asUnicodeString yourAddress

Is that closer?

Ian
-- 
The From address is valid
0
IanB
3/6/2010 3:41:45 PM
Great Ian,

that is exactly what I am looking for, thanks

I tested it out and behaviour is perfect.
te text. returns '' ... initially
te text. returns 'some thing typed here' ... when typed in
te text. returns '' ... when the text is removed (by being backspaced
over in this case)

regards
Sanjay



On Mar 6, 8:41=A0pm, IanB <cont...@sunhillow.eu> wrote:
> Sanjay,
>
> >actually it is the last effect I am looking for
>
> A wander through MSDN came up with ...
>
> sh :=3D Shell show.
> sh view addSubView: (te :=3D TextEdit new).
>
> te
> =A0 =A0 =A0 =A0 sendMessage: 16r1501 "EM_SETCUEBANNER"
> =A0 =A0 =A0 =A0 wParam: true asParameter
> =A0 =A0 =A0 =A0 lParam: 'Name ???' asUnicodeString yourAddress
>
> Is that closer?
>
> Ian
> --
> The From address is valid

0
Sanjay
3/7/2010 3:12:57 AM
Reply:

Similar Artilces:

Extract text with style from rich text fields
Hi everybody, Somebody know how can i extract text with its styles (bold, tables, pictures,etc) from a RicText field with LotusScript. I use the method richtextField.AppendText(textOfRitem) but only the text without his presentation is extracted. I put the extracted text in other RichText field (to create a report of all documents present in the base). in the follow line, the method that i use: Forall ch_action In doc.GetItemValue("RTField") Call rtitem.AppendText(ch_action) Call rtitem.AddNewline(2) End Forall Thank you Eric Mazzone, Hi Eric, a si...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What a...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

Search for text in a text field
Hi When posting a search box for the users, how do you take their input and search whether or not it is contained in a text field in many records and then diplay the records which contains the input. Thanks in advance, Luke. There is a function called InStr that will probably do what you require. Cheers, Chris "Luke Jones" <luke_jones_82@yahoo.co.uk> wrote in message news:24bb1508.0407080157.d587c63@posting.google.com... > Hi > > When posting a search box for the users, how do you take their input > and search whether or not it is contained in a text field in ...

text field only for text
Hi I would like some help about the following : I have a text field and I don't want it contains any numbers. How can I limit this situation ? So far, I couldn't find literature exacly about this here in the newsgroup. TIA Paulo "Paulo Rodrigues" <amigo.alf@netvisao.pt> wrote in message news:<newscache$kgmtmh$bb1$1@newsfront4.netvisao.pt>... > Hi > > I would like some help about the following : > > I have a text field and I don't want it contains any numbers. How can I > limit > this situation ? > > So far, I couldn't...

rich text in text field
I am using GUIDE for my UI work. (MATLAB 2009b) I would like to display some rich-text (font size change, bold, underline etc) inside a panel. Can I put some rich-text, using html tags, in a text field? For example: <html><b> this is bold </b></html> I know you can do it in table headers. Thank you. ...

Text filtering in a text field
Hi, am new to SKILL and would like to do some text checking and filtering for illegal characters in the text field. Meaning I have a text field in my form that is only to be with text, not any of the symbols (i.e. ~!@#$%^&* and so on). When the user input and saved the fields, those characters won't be allowed to be saved. What will be the best way to filter out only text? Only numbers? Terence <terrylau77@gmail.com> writes: > Hi, am new to SKILL and would like to do some text checking and > filtering for illegal characters in the text field. Meaning I have a > text f...

Text disappearing from text fields...
Hello, I'm currently working with a MySQL backend and is trying to use FileMaker 9's Web Form capabilities as a front end. From FileMaker Pro's interface, I have used the ODBC to connect my FileMaker database to my MySQL tables. The schema and existing data records loads into FileMaker without a problem. However, when I'm trying to insert text (VARCHAR and TEXT) data from FileMaker, it blanks out and ends up only inserting a blank into MySQL. Default values set on the MySQL side only take effect if I left that field blank on FileMaker when I create a new record. Default field...

VO2.7 with MSSql
Hi All, I just came accross a strange problem, I am trying to save text to a text field in an MSSql 2000 DB and it just doesn't happen. It is random! Sometimes even larger content can be saved to the Text field but it appears that the limit is around the 1,000 chars Does anyone have any clues? TIA, Tom Tom, There is a practical URL limit of about 8000 bytes under certain circumstances but certainly not around 1000. Something else is wrong. Perhaps it is the contents (a stray apostrophe, @ symbol or something). Do you get an error message? What is the data t...

Pasting Text files into a text field?
I want to past a text file into a text field but it looses it's format. It should appear in a table layout, is there a way round this? Thanks Ernie -- --------------------------------------------------------------------- "Are you still wasting your time with spam?... There is a solution!" Protected by GIANT Company's Spam Inspector The most powerful anti-spam software available. http://mail.spaminspector.com In reply to mSzjb.11$UY1.9@news-binary.blueyonder.co.uk on 10/16/03 4:41 PM by Ernie Faulkner ernie-NO-SPAMfaulkner@blueyonder.co.uk: Hi Ernie, To paste the ...

Enter text field and beginning of text
Does anyone know a way to enter a scroll box text field at the top or beginning of the filed instead of at the bottom? Thanks Bubba a �crit : > Does anyone know a way to enter a scroll box text field at the top or > beginning of the filed instead of at the bottom? > > Thanks > It layout mode, select the field and then use the Format -> Align Text menu script to select all, cut, goto field then paste... all original text will be after the cursor -- ------------------------------------------------- www.nsbtaxi.com Captain Guy s/v Island Time (352#277) AICW 845.5 3...

Insert text file in a text field ...
Hallo, I have 2 questions: 1) How can I insert a text file into a TEXT field of a table (by an sql instruction) ? 2) How can I insert a microsoft word file into a BLOB field of a table (by an sql instruction) ? Please, could you help me ? Thank you . Fab. On Thu, 18 Oct 2007 06:41:52 -0700, electric_r@yahoo.it wrote: > Hallo, > > I have 2 questions: > > 1) How can I insert a text file into a TEXT field of a table (by an > sql instruction) ? > > 2) How can I insert a microsoft word file into a BLOB field of a table > (by an sql instruction) ? > > Please,...

Insert text file in a text field
allo, I have 2 questions: with php and mysql : 1) How can I insert a text file into a TEXT field of a table ? 2) How can I insert a microsoft word file into a BLOB field of a table ? Please, could you help me with a simple example ? Thank you . Fab ...

Different text styles in the same text box
I am developing a bibliographic database. I am creating a report with bibliographic references like this: - Joyce, Ulysses, London, Penguin Press, 2002. The last string has been obtained by an expression like this: [author] & [text] & [city] & [publisher] & [date] Now there's a problem. I'd like to get different styles for the different fields (ex: italics for the author, underlined for the book title, etc). Is it possible? Thanks in advance Davide If I'm not mistaken there is a rich-text control that comes with VB that would allow you to do this, but I don't t...

Web resources about - Windows 7 style Text Fields backgound text - comp.lang.smalltalk.dolphin

Sen. Lee: Backgound Checks Could Allow Holder to Create Gun Registry Using Regulations
On Wednesday, Sen. Mike Lee (R-Utah) took to the Senate floor and warned that universal background checks could lead to a national registry system ...

Justice Department to invest $20 Million in Firearm Backgound Check System improvements
Justice Department to invest $20 Million in Firearm Backgound Check System improvements

Talk:Fire protection - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Disaster management , a collaborative effort to improve the coverage of Disaster management on ...

Projects of interest
Backgound: Currently you can get Wifi shields and network shields for Arduinos but the Arduino lacks the resources to use the full potential ...

Simultaneous Contrast: Luminance
This illusion is one of the simplest and best known of a large class of simultaneous contrast effects in which perception of an object's luminance ...

About Michael Hughes
M ichael Hughes, is a Board Certified Ocularist, who began working in prosthetics in 1982, is a native of Pennsylvania. He attended Bucknell ...

blaxploitation.com's Introduction To Blaxploitation Soundtracks
Blaxploitation, funk and groovy soundtracks and culture from blaxploitation.com

Larwyn's Linx: Missouri Secretly Shares Entire CCW List With Feds Against State Law
... will allow doctors to block your right to guns : PatUpd Levin: How will more background checks stop a mass murderer? : Scoop Sen. Lee: Backgound ...

Brand Strategy: Uniting Multiple Brands Under One
... brand strategy question from the BSI Emailbag. Bakhtier, a brand manager from a telecommunications company in Uzbekistan asks: "The Backgound: ...

Chimpreports.com-Uganda News - - CHIMPREPORTS.COM WEB SITE ADVERTISING
News, Analysis, Sports, Entertainment, Business & other Reports from Uganda, East Africa

Resources last updated: 1/31/2016 3:09:22 AM