Link to home
Create AccountLog in
Avatar of ljcor
ljcorFlag for United States of America

asked on

VB6 - Text assigned to StatusBar does not appear

As I step through this code it all seems to work perfectly.  The TagMsg is assigned to StatusBar1 but the TagMsg never appears in the StatusBar1.
Private Sub ShowTag(ctl As Control)
    Dim TagMsg As String
    TagMsg = ctl.Tag
    StatusBar1.Panels(1).Text = TagMsg
End Sub

Open in new window

Avatar of peetm
peetm
Flag of United Kingdom of Great Britain and Northern Ireland image

Depending upon how you're calling this, you might need a refresh or an update.  To test that, just insert a DoEvents call after you've set the text.
Avatar of Jorge Paulino
How do you call it ? Are you sure that you have anything on the Tag of the control ?
Avatar of ljcor

ASKER

Yes, the tag item is there.  I see it when I step through the procedure.

I tried both DoEvents and ctl.Refresh but still to not get any text in StatusBar1
You can see the panel?  The type is sbrText?  Also set Autosize to sbrContents
ASKER CERTIFIED SOLUTION
Avatar of Haris V
Haris V
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of ljcor

ASKER

I can see the StatusBar and can click on it to get the properties.   Style = sbrText and Autosize = sbrContents.
>>I can see the StatusBar and can click on it to get the properties.

And it's visible at runtime?

Try setting it to sbrTime.  See the time?
Avatar of ljcor

ASKER

I just read the blogspot item and found the problem.  I had a setting to Simple instead of Normal.  I know that I set that awhile back but cannot recall why at this time.
Avatar of ljcor

ASKER

Thanks once again, JP.  My entire family, including the great-grandchildren that you, too.