Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Vertically centering text in a label field

Because setting the textbox .enabled property = false results in a different "look" than the default appearance of a sunken label field. Prefer the look of the sunken label field. If you tell me there is nothing I can do to vertically center the font, then maybe I will be forced to use a textbox after all. But I'm hoping there is something I can do to use label field.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Vertically centering text in a label field

on 5/1/2011, mondrogan supposed :
Because setting the textbox .enabled property = false results in a different
"look" than the default appearance of a sunken label field. Prefer the look
of the sunken label field. If you tell me there is nothing I can do to
vertically center the font, then maybe I will be forced to use a textbox
after all. But I'm hoping there is something I can do to use label field.


Why can't you change the 'look' of the textbox so it resembles a sunken
label?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Vertically centering text in a label field

GS explained on 5/1/2011 :
on 5/1/2011, mondrogan supposed :
Because setting the textbox .enabled property = false results in a
different "look" than the default appearance of a sunken label field.
Prefer the look of the sunken label field. If you tell me there is nothing
I can do to vertically center the font, then maybe I will be forced to use
a textbox after all. But I'm hoping there is something I can do to use
label field.


Why can't you change the 'look' of the textbox so it resembles a sunken
label?


To change a textbox so it 'looks' like a sunken label:

1. Change BackColor to SystemButtonFace.
2. Leave Enabled so the text doesn't display greyed out.
3. In its KeyDown event enter:
KeyCode = 0
This will prevent changes via the keyboard.
This will allow changes via code.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vertically centering text in a label field mondrogan Excel Programming 3 May 2nd 11 02:57 AM
centering text on textbox Alberto Ast[_2_] Excel Programming 5 January 14th 10 11:14 PM
text centering AlanW Excel Programming 1 September 1st 07 08:22 AM
Centralizing Vertically of Label and TextBox zhj23 Excel Programming 0 March 2nd 06 03:28 PM
Centering the text in a message box Rob_T Excel Programming 2 October 10th 04 01:12 AM


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"