[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 640
  • Last Modified:

status strip

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
sirbounty
Asked:
sirbounty
1 Solution
 
Kinger247Commented:
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
 
olifaragoCommented:
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
 
davidrichardsonCommented:
Are the lables enabled?
tssStatus.Enabled = True
tssStatus.Visible = True
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
Kinger247Commented:
I don't think the enabled state makes a difference. ...
0
 
sirbountyAuthor Commented:
"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
 
sirbountyAuthor Commented:
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
 
newyuppieCommented:
what if you call the Refresh method on the statusstrip after setting the text, does that make any difference?
0
 
sirbountyAuthor Commented:
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
 
Kinger247Commented:
Ok, where are you setting the labels before or after this code is run ?
Make sure its the last thing thats done.
0
 
sirbountyAuthor Commented:
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
 
Kinger247Commented:
Could try and applications.doevents after setting the label. ..
0
 
Kinger247Commented:
Could try 'an' applications.doevents after setting the label. ..
0
 
sirbountyAuthor Commented:
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
 
Kinger247Commented:
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
 
sirbountyAuthor Commented:
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
 
Kinger247Commented:
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
 
sirbountyAuthor Commented:
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
 
Kinger247Commented:
Thats tomorrow isn't it ?

happy thanksgiving !

we don't have that in the UK, ... wish we did though :)
0
 
Kinger247Commented:
Hi sirbounty, did you get this done in the end !?
0
 
sirbountyAuthor Commented:
Been on vacation (from work) - back now and looking back through this now...
0
 
sirbountyAuthor Commented:
Ack!  No....

I'm back at work next week - please leave it open till then and I'll take care of this...thanx!
0
 
sirbountyAuthor Commented:
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now