|
-
Nov 23rd, 2000, 11:47 AM
#1
Thread Starter
Addicted Member
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
-
Nov 23rd, 2000, 02:31 PM
#2
Addicted Member
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.
-
Nov 24th, 2000, 06:08 AM
#3
Thread Starter
Addicted Member
Hi. Thanks for your reply.
I need it do display text, and be used for entering text.
-
Nov 24th, 2000, 06:39 AM
#4
Lively Member
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
-
Nov 24th, 2000, 07:05 AM
#5
Thread Starter
Addicted Member
Thanks. I'll try it and see what happens.
-
Nov 24th, 2000, 07:15 AM
#6
Thread Starter
Addicted Member
It's still doing the same thing.
-
Nov 24th, 2000, 08:09 AM
#7
Lively Member
hi,
try setting the child property of coolbar to none
if this doesn't work mail me your code
-
Nov 24th, 2000, 11:46 AM
#8
Thread Starter
Addicted Member
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.
-
Nov 24th, 2000, 12:32 PM
#9
transcendental analytic
Try moving it onto the coolbar at runtime using setparent
Code:
Private Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
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.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 24th, 2000, 03:03 PM
#10
Thread Starter
Addicted Member
Thankyou. I'll try that and let you know what happens.
-
Nov 24th, 2000, 05:39 PM
#11
Addicted Member
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! 
Are you sure that somewhere in your code it isn't changing the colour back to white?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|