Results 1 to 11 of 11

Thread: Weird stuff happening with the coolbar

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176
    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

  2. #2
    Addicted Member darrenl's Avatar
    Join Date
    Jul 2000
    Location
    Portsmouth, UK
    Posts
    148
    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.
    Dazzer

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176
    Hi. Thanks for your reply.

    I need it do display text, and be used for entering text.

  4. #4
    Lively Member
    Join Date
    Nov 2000
    Posts
    73
    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

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176
    Thanks. I'll try it and see what happens.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176
    It's still doing the same thing.

  7. #7
    Lively Member
    Join Date
    Nov 2000
    Posts
    73
    hi,
    try setting the child property of coolbar to none

    if this doesn't work mail me your code

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176
    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.

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Peterborough, Cambs, England
    Posts
    176
    Thankyou. I'll try that and let you know what happens.

  11. #11
    Addicted Member Ramandeep's Avatar
    Join Date
    Feb 2000
    Posts
    158
    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
  •  



Click Here to Expand Forum to Full Width