Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. DataBinding statusBarPanel

DataBinding statusBarPanel

Scheduled Pinned Locked Moved C#
helptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rich_wenger
    wrote on last edited by
    #1

    There seems to be no direct way to databind to a StatusBarPanel; I've run across some incomplete code samples that advises using a method to create a property for the statusBarPanel and then use the new property to databind to the dataset. The problem is I don't know how to proceed from there. Any help greatly appreciated. Code Snippet ========================================================== public string StatusBarPanel1Text { get { return statusBarPanel1.Text; } set { statusBarPanel1.Text = value; } }

    M 1 Reply Last reply
    0
    • R rich_wenger

      There seems to be no direct way to databind to a StatusBarPanel; I've run across some incomplete code samples that advises using a method to create a property for the statusBarPanel and then use the new property to databind to the dataset. The problem is I don't know how to proceed from there. Any help greatly appreciated. Code Snippet ========================================================== public string StatusBarPanel1Text { get { return statusBarPanel1.Text; } set { statusBarPanel1.Text = value; } }

      M Offline
      M Offline
      miah alom
      wrote on last edited by
      #2

      In you Form do the following StatusText st = new StatusText(); st.StatusBarPanel1Text = "HELLO"; this.statusBar1.DataBindings.Clear(); this.statusBar1.DataBindings.Add( new Binding("Text", st, "StatusBarPanel1Text")); Declare the class public class StatusText { private string str; public string StatusBarPanel1Text { get { return str; } set { str = value; } } }

      R 1 Reply Last reply
      0
      • M miah alom

        In you Form do the following StatusText st = new StatusText(); st.StatusBarPanel1Text = "HELLO"; this.statusBar1.DataBindings.Clear(); this.statusBar1.DataBindings.Add( new Binding("Text", st, "StatusBarPanel1Text")); Declare the class public class StatusText { private string str; public string StatusBarPanel1Text { get { return str; } set { str = value; } } }

        R Offline
        R Offline
        rich_wenger
        wrote on last edited by
        #3

        Hi, Thanks for responding to my issue; I tried your suggestion and it doesn't seem to work for me. I get no errors but the statusBarPanel remains unaffected.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups