No focus Required

Jonno

Registered User.
Local time
Today, 10:46
Joined
Mar 17, 2003
Messages
74
I have a Pop-Up form with just one text box. Is there a command so I can remove focus completely from any controls? I wish to have the Text box not highlighted as it has focus.
 
You can do this by creating an unbound control, ie text box and settin thru properties its size to Width=0 & Height=0.

Set this unbound's tab stop to yes.
Set your other text's tab stop to No.

When your form has focus, you won't know where the focus is because the unbound cannot be seen.
 
2 options come to mind: (perhaps)

1) Possible to use a label?

2) Set properties of text box to:

- Enabled: No
- Locked: Yes
- Then alter appearance as required.

HTH

Brad.
 
Brilliant - Thanks guys. I know its just a small aesthetic thing, but keeps things neat.
 
This
I wish to have the Text box not highlighted as it has focus
is a little confusing. I am going out n a limb here and assuming you still want the text box to have focus, but do not want the text high lighted. Have you tried setting the textbox property SELENGTH to zero (or is it SELLENGTH) any way the select length tells the text box how many characters are selected (high lighted). You might try (I have not tried it) in the get focus to set that property to zero. I have only used it with another property to position the cursor in a text field to actually select a portion of the text.
 
FoFa said:
assuming you still want the text box to have focus, but do not want the text high lighted.

It was my wording. The text box contains a calculation to view only, I didnt want the focus in the Textbox at all.
 
Then why not just use a label?
 
The textbox is updated when the form opens, with a result of a calculation based on records selected in another form.
 
Use the combincation of bradaccess and mm-uk solutions - have the textbox with the calculation in enabled=no and loicked=yes and a textbox with the height and width set to 0 (but enabled=true and locked=true.

Alternatively have a command button on the form with the focus set to that.
Or if the calculation is for display only, use a messagebox with the calculated value on - numerous of ways of doing this - refer to a hidden control on the main form with the calculation in, perform the calculation in code etc....
 
Jonno said:


It was my wording. The text box contains a calculation to view only, I didnt want the focus in the Textbox at all.
Then just set the Enabled property to no and locked to yes, you don't need any hidden controls
 

Users who are viewing this thread

Back
Top Bottom