Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

What I am trying to do is get the name of a panel that exists in my statusBar, I cant seem to find any properties that will let me do it??

 

Dim i as integer

Dim tempStatusBar As StatusBar = theStatusBar

Dim tempStatusBarPanels As StatusBarPanelCollection = tempStatusBar.Panels

 

For i = 0 To tempStatusBarPanels.Count - 1

 

tempStatusBarPanels.?????????????

 

next

 

 

Any ideas??????

 

Thanks

Joshua

  • Administrators
Posted

Statusbar panels don't have a name property. What are you trying to do, there may be another way round the problem.

 

Also

 

   For Each sp As StatusBarPanel In theStatusBar.Panels
           'use sp here
           sp.Text = "Test"

       Next

 

is probably slightly cleaner code for what you were doing.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Hi,

 

I have a status bar panel with a number of panels created, this will differ with the application I am using it for, and I have named them when I created them so I assumed I could get the name back out under code.

 

Thanks for the tip on the code too, it is much cleaner!

 

Thanks

Joshua

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...