Solved

status strip

Posted on 2006-11-22
23
550 Views
Last Modified: 2009-12-16
I dropped a status strip on my form, with two labels.
It's not updating as expected, as a matter of fact, I tried setting the text in my form load and both are blank.

tssStatus.Text="Hello"
tssCounter.Text="World"

What am I missing?  Gotta be simple...
0
Comment
Question by:sirbounty
23 Comments
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Where are you calling the labels from ?  and what version of vb 2003 or 2005?

Not the kind of question I'd expect from you Mr. sirbounty ;)
0
 
LVL 9

Expert Comment

by:olifarago
Comment Utility
I know this doesnt help solver your issue but out of interest, I just created a blank form, dropped on a status strip with two status labels leaving all names as default, and this code:

        ToolStripStatusLabel1.Text = "Hello"
        ToolStripStatusLabel2.Text = "World"

In form load changes the labels as expected.

oli
0
 
LVL 7

Expert Comment

by:davidrichardson
Comment Utility
Are the lables enabled?
tssStatus.Enabled = True
tssStatus.Visible = True
0
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
I don't think the enabled state makes a difference. ...
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
"Not the kind of question I'd expect from you Mr. sirbounty ;)"

I know - I'm lazy and well, it's the holidays, thought some folks could use some easy points, etc, etc... ;)
Besides, I'm still learning .net!

Using 2005 here.
I'll check that they're enabled...that's pretty much all I did with dropping the status panel, two labels and clearing the text on them - but it was a preexisting form...
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
K - they're enabled.
I can set the text to A & B, respectively and see the text when the form loads.
Even with the 'change' to it in my form load though, it remains A & B... : \
0
 
LVL 13

Expert Comment

by:newyuppie
Comment Utility
what if you call the Refresh method on the statusstrip after setting the text, does that make any difference?
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
K - stupid mistake on my part about the form load...it would never hit that cause another sub is called and doesn't really finish until the form is done...
But that doesn't explain why it's not updating properly... : \
0
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Ok, where are you setting the labels before or after this code is run ?
Make sure its the last thing thats done.
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
Kind of 'in' it...

The code opens an oledb connection, loops through the records and processes each one.
It's essentially a 'testing' app - so that when the user clicks the submit button, the controls are tested for correctness...then the following runs:

If intA = strAnswer.Length Then
  intRight += 1
  tssStatus.Text = "You are correct!"
Else ...

It's hitting that line, but not setting the text... : \
0
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Could try and applications.doevents after setting the label. ..
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Could try 'an' applications.doevents after setting the label. ..
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
Already have it earlier up.
Just posted it for another question - have a look if you'd like...https://filedb.experts-exchange.com/incoming/ee-stuff/1482-quizzer.zip
0
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Whats the  for ?

            Do While Not blnAttempt
                Application.DoEvents()
            Loop

does it work without this, this is why its not loading ... you won't reach it until you click the select button and its in your load event !
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
That's how I was having it 'sit and wait' until the current question is answered (and the blnAttempt is then set to true).
It's being reached after each question though - and a new question appears as expected.  Everything was working fine until I thought of adding a status...
0
 
LVL 10

Accepted Solution

by:
Kinger247 earned 125 total points
Comment Utility
I can't see how it is, if your wating for input from the user, use the control events and not a loop of death,
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
For each row in the table
 if field [Correct] is > 1 then
   dynamically create checkboxes
 else
  dynamically create radio buttons
set the textbox text to the retrieved question
setup the "answer" array
AssignCorrect sets the tag property of the 'correct' controls to 1
Then it sits and waits for the user to submit their answer so that the next row can be read...

I think I got led down that way from another thread - I suppose I could readjust it to read a record in each time submit is pressed...just not before thanxgiving! :^)
0
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Thats tomorrow isn't it ?

happy thanksgiving !

we don't have that in the UK, ... wish we did though :)
0
 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
Hi sirbounty, did you get this done in the end !?
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
Been on vacation (from work) - back now and looking back through this now...
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
Ack!  No....

I'm back at work next week - please leave it open till then and I'll take care of this...thanx!
0
 
LVL 67

Author Comment

by:sirbounty
Comment Utility
Alright - presumably my do loop hung this up.
I haven't gotten past that yet (haven't worked on this since posting it - haha! - too much vacation!)

But thanx to the respondents.  
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now