Hi
When I put a text box onto a cool bar, and change the text box backcolor property it seems to work at design time.
However, when I run the program, the text box backcolor goes back to white.
How can I sort this out?
Thanks
Printable View
Hi
When I put a text box onto a cool bar, and change the text box backcolor property it seems to work at design time.
However, when I run the program, the text box backcolor goes back to white.
How can I sort this out?
Thanks
Afraid no solution from me but it does defy the old grey matter, do you really want to use a text box? Why not try a different control that displays text.
Hi. Thanks for your reply.
I need it do display text, and be used for entering text.
hi,
try this in a new form
1 draw a coolbar first
2 draw a text box
3 color it then
4 cut the textbox
5 click coolbar
6 paste
be careful
when u paste , the textbox should be with in boundaries of coolbar
hope this helps u
Thanks. I'll try it and see what happens.
It's still doing the same thing.
hi,
try setting the child property of coolbar to none
if this doesn't work mail me your code
Hi Krigans,
I added the text box at design time. I've set the backcolor at design time, and at run time but it doesn't work.
I'll try the child property setting.
Thanks.
Try moving it onto the coolbar at runtime using setparent
you pass the handle of the textbox and the handle of the coolbar. Just remember you have to move the textbox assuming the new origo for the coolbar.Code:Private Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Thankyou. I'll try that and let you know what happens.
Well PaulB I tried that and it seemed to work for me, here are the steps I did:
1. Start Standard exe project
2. Add the coolbar control to my toolbox
3. Draw the coolbar on the form
4. Draw the textbox in the coolbar
5. Change text boxes back colour
6. Run program, Finish! :D
Are you sure that somewhere in your code it isn't changing the colour back to white?