View previous topic :: View next topic |
Author |
Message |
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Nov 17, 2007 12:10 pm Post subject: BUG: setting status text on a statusbar panel does not work |
|
|
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 |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Nov 17, 2007 12:40 pm Post subject: found it |
|
|
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 |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Nov 19, 2007 9:50 am Post subject: Re: found it |
|
|
This was fixed in the snapshot a while back. |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Mon Nov 19, 2007 10:10 am Post subject: Re: found it |
|
|
Chris Miller wrote: | This was fixed in the snapshot a while back. |
Ok. Cool. I'll grab the latest snapshot then. |
|
Back to top |
|
|
|