Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

status strip

Posted on 2006-11-22
23
Medium Priority
?
594 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
23 Comments
 
LVL 10

Expert Comment

by:Kinger247
ID: 17997399
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
ID: 17997433
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
ID: 17997437
Are the lables enabled?
tssStatus.Enabled = True
tssStatus.Visible = True
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 10

Expert Comment

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

Author Comment

by:sirbounty
ID: 17997461
"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
ID: 17997487
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
ID: 17997492
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
ID: 17997502
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
ID: 17997521
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
ID: 17997569
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
ID: 17997583
Could try and applications.doevents after setting the label. ..
0
 
LVL 10

Expert Comment

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

Author Comment

by:sirbounty
ID: 17997640
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
ID: 17997689
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
ID: 17997719
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 500 total points
ID: 17997745
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
ID: 17997804
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
ID: 17997841
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
ID: 18015929
Hi sirbounty, did you get this done in the end !?
0
 
LVL 67

Author Comment

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

Author Comment

by:sirbounty
ID: 18208605
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
ID: 18227115
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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

604 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