Click here to Skip to main content
15,892,480 members
Home / Discussions / C#
   

C#

 
GeneralRe: [Msg Deleted] Pin
Tom Wright9-Sep-05 12:17
Tom Wright9-Sep-05 12:17 
GeneralRe: [Msg Deleted] Pin
Judah Gabriel Himango9-Sep-05 19:17
sponsorJudah Gabriel Himango9-Sep-05 19:17 
GeneralRe: XML deserializer question Pin
Tom Wright9-Sep-05 11:42
Tom Wright9-Sep-05 11:42 
GeneralRe: XML deserializer question Pin
S. Senthil Kumar9-Sep-05 22:44
S. Senthil Kumar9-Sep-05 22:44 
GeneralRe: XML deserializer question Pin
Tom Wright10-Sep-05 4:48
Tom Wright10-Sep-05 4:48 
QuestionGenerics and pointers Pin
kippolito9-Sep-05 9:46
kippolito9-Sep-05 9:46 
AnswerRe: Generics and pointers Pin
Judah Gabriel Himango9-Sep-05 10:23
sponsorJudah Gabriel Himango9-Sep-05 10:23 
Questionstatusbar Pin
xilefxilef9-Sep-05 7:59
xilefxilef9-Sep-05 7:59 
AnswerRe: statusbar Pin
miah alom9-Sep-05 8:05
miah alom9-Sep-05 8:05 
GeneralRe: statusbar Pin
xilefxilef9-Sep-05 8:11
xilefxilef9-Sep-05 8:11 
GeneralRe: statusbar Pin
miah alom9-Sep-05 8:32
miah alom9-Sep-05 8:32 
GeneralRe: statusbar Pin
xilefxilef9-Sep-05 8:47
xilefxilef9-Sep-05 8:47 
GeneralRe: statusbar Pin
miah alom9-Sep-05 9:50
miah alom9-Sep-05 9:50 
GeneralRe: statusbar Pin
xilefxilef9-Sep-05 10:38
xilefxilef9-Sep-05 10:38 
GeneralRe: statusbar Pin
miah alom9-Sep-05 10:44
miah alom9-Sep-05 10:44 
GeneralRe: statusbar Pin
xilefxilef9-Sep-05 10:55
xilefxilef9-Sep-05 10:55 
GeneralRe: statusbar Pin
miah alom9-Sep-05 11:04
miah alom9-Sep-05 11:04 
GeneralRe: statusbar Pin
xilefxilef9-Sep-05 13:24
xilefxilef9-Sep-05 13:24 
Here is a part of my code. I'm using e.Panel.Width to get the width of the panel. Is there a difference between this and what you suggested?


...this.statusBar1.Panels[0].Style = StatusBarPanelStyle.OwnerDraw;
this.statusBar1.DrawItem += new StatusBarDrawItemEventHandler(Parent_DrawItem);
...



private void Parent_DrawItem(object sender, StatusBarDrawItemEventArgs e)
{

SizeF stringSize = e.Graphics.MeasureString(e.Panel.Text, e.Font);
...

From here on I'm using stringSize.Width and e.Panel.Width, but when visually panel ends where the text ends their actual widths are very different, eventhough visually they are the same.

Why such difference?

Thank you for all the help


QuestionFont in resource Pin
Leyu9-Sep-05 7:22
Leyu9-Sep-05 7:22 
QuestionHow to declare an Array of Pens? Pin
...---...9-Sep-05 6:59
...---...9-Sep-05 6:59 
AnswerRe: How to declare an Array of Pens? Pin
Andy Moore9-Sep-05 7:27
Andy Moore9-Sep-05 7:27 
GeneralRe: How to declare an Array of Pens? Pin
...---...9-Sep-05 7:33
...---...9-Sep-05 7:33 
QuestionDataBinding statusBarPanel Pin
rich_wenger9-Sep-05 6:03
rich_wenger9-Sep-05 6:03 
AnswerRe: DataBinding statusBarPanel Pin
miah alom9-Sep-05 8:24
miah alom9-Sep-05 8:24 
GeneralRe: DataBinding statusBarPanel Pin
rich_wenger9-Sep-05 14:12
rich_wenger9-Sep-05 14:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.