Solved

status strip

Posted on 2006-11-22
23
567 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
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 125 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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