FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BUG: setting status text on a statusbar panel does not work

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Nov 17, 2007 12:10 pm    Post subject: BUG: setting status text on a statusbar panel does not work Reply with quote

To reproduce just change these two methods in the status.d example as indicated below.

Code:

    private void control_enter(Control sender, MouseEventArgs ea)
    {
        //sbar.text = sender.text; // Set no-panels text.
        //sbar.showPanels = false; // Shows text property instead of panels.
        sbar.panels[1].text = sender.text;
    }
   
   
    private void form_enter(Control sender, MouseEventArgs ea)
    {
        //sbar.showPanels = true; // Go back to the panels.
        sbar.panels[1].text = "Hover over mouse controls";
    }


If you do that then the status bar no longer changes as you hover around.
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Nov 17, 2007 12:40 pm    Post subject: found it Reply with quote

Debugging a bit further the problem seems to be that the parent of the StatusBarPanels never gets set. I think dfl.statusbar.StatusBar.StatusBarPanelCollection._added needs to set it.

Code:

      void _added(size_t idx, StatusBarPanel val)
      {
         if(val._parent)
            throw new DflException("StatusBarPanel already belongs to a StatusBar");
         
         val._parent = sb; // <=== add this line
         if(sb.created)
         {
            _setcurparts();
         }
      }



Adding that one line of code above seems to fix it for me.
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Nov 19, 2007 9:50 am    Post subject: Re: found it Reply with quote

This was fixed in the snapshot a while back.
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Mon Nov 19, 2007 10:10 am    Post subject: Re: found it Reply with quote

Chris Miller wrote:
This was fixed in the snapshot a while back.


Ok. Cool. I'll grab the latest snapshot then.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group