StatusBar Panel 
Author Message
 StatusBar Panel

Hi all,

I have a statusbar with 5 panels on a MDIForm in my application (VB6 SP5).
The first panel is used for text only, the others for pictures.
When a user moves the mouse over a control a helptext is shown in the first
panel. This works fine until the mouse is moved over a MSHFlexGrid: panels 3
to 5 show some disabled images from an ImageList control (also on the
MDIForm).

Is this a bug? Is there a workaround? Any help will be appreciated! Thanks.

Stefan De Schepper.



Sat, 25 Sep 2004 17:41:25 GMT  
 StatusBar Panel
Not sure what you mean by "a helptext".. but, I couldn't reproduce your
problem... basically, I created a new (MDI) project, dropped a StatusBar and
an ImageList on the Parent form. Filled the image list with random colorful
icons, set their Key properties (as coded) added a MSHFlexGrid control to
the child form, set it's ToolTipText = "This is a test".. added code below
and hit F5... aside from distorted icons (since I didn't adjust the size of
the status bar) and a bit of flickering (because I'm not checking for same
text before updating the StatusBar), it worked and didn't show any disabled
pictures.
'=============MDIForm1
Option Explicit

Private Sub MDIForm_Click()
   Dim f As Form1 'MDI Child w/Grid
   Set f = New Form1
   f.Show
End Sub

Private Sub MDIForm_Load()
   With StatusBar1
      .Panels(2).Picture = ImageList1.ListImages("Two").ExtractIcon
      .Panels(3).Picture = ImageList1.ListImages("Three").ExtractIcon
      .Panels(4).Picture = ImageList1.ListImages("Four").ExtractIcon
      .Panels(5).Picture = ImageList1.ListImages("Five").ExtractIcon
   End With
End Sub
'=============Form1 (MDI Child)
Option Explicit

Private Sub Form_Load()
   With MSHFlexGrid1
      .Cols = 4
      .Rows = 20
      .FixedCols = 0
      .FixedRows = 1
      .ToolTipText = "This is a test"
   End With
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single,
Y As Single)
   MDIForm1.StatusBar1.Panels(1).Text = ""
End Sub

Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
   MDIForm1.StatusBar1.Panels(1).Text = MSHFlexGrid1.ToolTipText
End Sub
'=============

Is this similar to what you're doing? If not, what is "helptext"?

--
Ken Halter
MS-MVP-VB
Please keep it in the groups..

Quote:

> Hi all,

> I have a statusbar with 5 panels on a MDIForm in my application (VB6
> SP5). The first panel is used for text only, the others for pictures.
> When a user moves the mouse over a control a helptext is shown in the
> first panel. This works fine until the mouse is moved over a
> MSHFlexGrid: panels 3 to 5 show some disabled images from an
> ImageList control (also on the MDIForm).

> Is this a bug? Is there a workaround? Any help will be appreciated!
> Thanks.

> Stefan De Schepper.



Sun, 26 Sep 2004 09:10:03 GMT  
 StatusBar Panel
Thanks for reacting, Ken.

The statusbar is meant for showing a bit of help. I've seen plenty of
applications doing that. So with 'helptext' I mean 'a sentence or a few
words describing what the window or menuitem, the mouse is currently moving
over, would do'. I'm sure you've seen it as well.

I do not use the ToolTipText property. Instead I call a public procedure on
the MDIForm (I work with several child forms and they all have to display
those helptexts) which sets the statusbar's panel text. The problem occurs
only with a MSHFlexGrid control. Other controls work fine.
But I found a solution, well, actually a workaround... Now I subclass the
MSHFlexGrid's WM_MOUSEMOVE. Then I call the public procedure. The disabled
icons don't show up anymore.

Stefan De Schepper.


Quote:
> Not sure what you mean by "a helptext".. but, I couldn't reproduce your
> problem... basically, I created a new (MDI) project, dropped a StatusBar
and
> an ImageList on the Parent form. Filled the image list with random
colorful
> icons, set their Key properties (as coded) added a MSHFlexGrid control to
> the child form, set it's ToolTipText = "This is a test".. added code below
> and hit F5... aside from distorted icons (since I didn't adjust the size
of
> the status bar) and a bit of flickering (because I'm not checking for same
> text before updating the StatusBar), it worked and didn't show any
disabled
> pictures.
> '=============MDIForm1
> Option Explicit

> Private Sub MDIForm_Click()
>    Dim f As Form1 'MDI Child w/Grid
>    Set f = New Form1
>    f.Show
> End Sub

> Private Sub MDIForm_Load()
>    With StatusBar1
>       .Panels(2).Picture = ImageList1.ListImages("Two").ExtractIcon
>       .Panels(3).Picture = ImageList1.ListImages("Three").ExtractIcon
>       .Panels(4).Picture = ImageList1.ListImages("Four").ExtractIcon
>       .Panels(5).Picture = ImageList1.ListImages("Five").ExtractIcon
>    End With
> End Sub
> '=============Form1 (MDI Child)
> Option Explicit

> Private Sub Form_Load()
>    With MSHFlexGrid1
>       .Cols = 4
>       .Rows = 20
>       .FixedCols = 0
>       .FixedRows = 1
>       .ToolTipText = "This is a test"
>    End With
> End Sub

> Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As
Single,
> Y As Single)
>    MDIForm1.StatusBar1.Panels(1).Text = ""
> End Sub

> Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X
As
> Single, Y As Single)
>    MDIForm1.StatusBar1.Panels(1).Text = MSHFlexGrid1.ToolTipText
> End Sub
> '=============

> Is this similar to what you're doing? If not, what is "helptext"?

> --
> Ken Halter
> MS-MVP-VB
> Please keep it in the groups..

> > Hi all,

> > I have a statusbar with 5 panels on a MDIForm in my application (VB6
> > SP5). The first panel is used for text only, the others for pictures.
> > When a user moves the mouse over a control a helptext is shown in the
> > first panel. This works fine until the mouse is moved over a
> > MSHFlexGrid: panels 3 to 5 show some disabled images from an
> > ImageList control (also on the MDIForm).

> > Is this a bug? Is there a workaround? Any help will be appreciated!
> > Thanks.

> > Stefan De Schepper.



Sun, 26 Sep 2004 17:38:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Statusbar Panel Problem with the INS panel

2. statusbar panel text color

3. StatusBar Panel and adding an .bmp image from an imagelist

4. statusbar panels

5. Changing the backcolor of a statusbar-panel

6. show progress in statusbar panel

7. ProgressBar inside a StatusBar Panel?

8. Statusbar (panels 1 and 2) example

9. How to load picture in statusBar panel

10. Selected ListItem to appear in StatusBar Panel

11. How to insert ProgressBar into StatusBar panel?

12. Help with updating label captions and statusbar panel text

 

 
Powered by phpBB® Forum Software