Print Page | Close Window

CommandBars.StatusBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=822
Printed Date: 27 September 2024 at 1:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBars.StatusBar
Posted By: Maui
Subject: CommandBars.StatusBar
Date Posted: 11 June 2004 at 4:31am

I was looking at one of the examples and saw that there seemed to be several special fields that could be passed to the status bar. eg This one writes CAPS into one of the panes of the statusbar if caps lock is down when I start the sample application.

Const ID_INDICATOR_CAPS As Long = 59137

StatusBar.AddPane ID_INDICATOR_CAPS

Are there any other special values that can be passed besides these 3? I couldnt find anything in the documentation or tutorials.

Const ID_INDICATOR_CAPS As Long = 59137
Const ID_INDICATOR_NUM = 59138
Const ID_INDICATOR_SCRL = 59139

Thanks




Replies:
Posted By: Maui
Date Posted: 11 June 2004 at 5:31am

Also, is there someway to refresh this statusbar?

CAPS displays when the program runs but if i press the Caps Lock button the display isnt updated. I assumed the keypress event would need to be captured for the form so I went in there to add some code to refresh the statusbar but there isnt any method suitable that I could see.

Thanks



Posted By: SuperMario
Date Posted: 11 June 2004 at 5:34am
I believe these are all valid:

 ID_IDLE_PANE = 0 'Displayes Idle text and DescriptionText of Controls on MouseOver
 ID_INDICATOR_CAPS = 59137
 ID_INDICATOR_NUM = 59138
 ID_INDICATOR_SCRL = 59139



Posted By: SuperMario
Date Posted: 11 June 2004 at 5:41am
I'm not sure what your problem is with the Statusbar updating.  You do not have to do anything special to get it to "refresh."

Here is my code added after the commandbar is created in the form load event:

    Dim StatusBar As XtremeCommandBars.IStatusBar
    Set StatusBar = CommandBars.StatusBar
    StatusBar.Visible = True
   
    StatusBar.AddPane 0
    StatusBar.AddPane ID_INDICATOR_CAPS
    StatusBar.AddPane ID_INDICATOR_NUM
    StatusBar.AddPane ID_INDICATOR_SCRL

Can you post a sample project with the "refresh" problem?


Posted By: Maui
Date Posted: 11 June 2004 at 8:51am

Yeah my code is exactly the same. I got it from the Commandbar SDI sample app. The same problem/situation exists in that application as well.

If you have caps lock on and then load/run the app the status bar comes up with CAPS in it. Correctly indicating that the Caps Lock is on.

If I now press my Caps lock button, turning Caps Lock off, I would expect that the status bar should update and remove the CAPS from the statusbar pane.

On my pc i can sit there and hammer the num lock key, caps lock key etc all day and nothing is updated in the statusbar pane.

If I reload/run the app however it will correctly detect the state of these keys and sets the display accordingly. Because the results "locked" like that I assumed it needed to be refreshed somehow.

If you cant refresh it then how does this control get updated?

Also, what keys do ID_INDICATOR_REC, ID_INDICATOR_OVR and ID_INDICATOR_EXT indicate?

Thanks SuperMario



Posted By: SuperMario
Date Posted: 11 June 2004 at 9:17am
Everything is handled internally by the Statusbar. 

ID_INDICATOR_REC, ID_INDICATOR_OVR and ID_INDICATOR_EXT are only supported in MFC right now.

How exactly can I reproduce your problem?  What OS?  I start application with CAPS ON and I have no problem turning it off/on.  Maybe I need to reboot and try?


Posted By: Maui
Date Posted: 12 June 2004 at 1:10pm

I have tried a new keyboard and updated drivers in case it was something funny there. I also tried compiling the program and running the exe but still no joy.

Our code is exactly the same so I have no idea whats wrong.

My system is pretty bulk standard. A Dell pc with xp pro.

I can update a text pane ok so the control is working, and it loads the state of the keys correctly when the app starts. Dunno why it wont refresh while the app is running though.



Posted By: Maui
Date Posted: 02 August 2004 at 10:05am
I have upgraded to v9.1 and this problem no longer occurs.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net