Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
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 
QuestionDialog in deployment project (any tutorials?) Pin
BlackDice9-Sep-05 4:09
BlackDice9-Sep-05 4:09 
AnswerRe: Dialog in deployment project (any tutorials?) Pin
Susan Hernandez9-Sep-05 13:05
Susan Hernandez9-Sep-05 13:05 
GeneralRe: Dialog in deployment project (any tutorials?) Pin
BlackDice12-Sep-05 3:36
BlackDice12-Sep-05 3:36 
GeneralRe: Dialog in deployment project (any tutorials?) Pin
Susan Hernandez12-Sep-05 6:49
Susan Hernandez12-Sep-05 6:49 
GeneralRe: Dialog in deployment project (any tutorials?) Pin
BlackDice12-Sep-05 6:53
BlackDice12-Sep-05 6:53 
GeneralRe: Dialog in deployment project (any tutorials?) Pin
BlackDice12-Sep-05 7:04
BlackDice12-Sep-05 7:04 
GeneralRe: Dialog in deployment project (any tutorials?) Pin
Susan Hernandez12-Sep-05 7:12
Susan Hernandez12-Sep-05 7:12 
QuestionArrayList Pin
Agyeman9-Sep-05 3:56
Agyeman9-Sep-05 3:56 
AnswerRe: ArrayList Pin
miah alom9-Sep-05 4:07
miah alom9-Sep-05 4:07 
AnswerRe: ArrayList Pin
brunoconde9-Sep-05 4:10
brunoconde9-Sep-05 4:10 

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.