DTP Color

ralhasan
02-11-2001, 08:31 AM
How Can I change the text color of the DateTime Picker, I mean the color of the text that appears after selection is done and the picker is closed.
Thanx

pponchot
03-14-2001, 08:06 AM
I assume you are talking about using the control panel and changing the Date/Time. Please give some more details so I can try to help you.

Phillip

ralhasan
03-14-2001, 09:44 AM
Actually I mean the DateTime Picker control used in visual basic, I am working on an application and I need to change the color of the text to a color other than black but the I can not do that for this control.

pponchot
03-14-2001, 12:38 PM
I looked at both VB5 and VB6 and I didn't see a Date Picker even when I went into Components. Most controls can change the backcolor and forecolor like this:

controlname.backcolor = vbred
controlname.forecolor = vbwhite

Usually if you have a control, the first instance of the control is 1 therefore, don't forget that you have to include this in the control name. For instance the first label on a form is label1. To set the color for the label I would do this:

label1.backcolor = vbblue
label1.forecolor = vbwhite

This gives me white text with a blue background.

Some controls, you can only set the background like the command buttons. There is no foreground property that can be set.

To see the properties that a control has, just look at the propery page.

Sorry that I couldn't be more help.


Phillip

klabranche
03-14-2001, 02:16 PM
I don't think you can change the color but you could change the font to be bolded, underlined, ect... or even change the font after a selection.

in the change event of the datetime picker
date1.font.bold = true
date1.font.name = "arial"

hope this helps...

http://www.extreme-vb.net/images/icons/smile.gif

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum