Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic InplaceEdit font and zooming (Read 1485 times)
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
InplaceEdit font and zooming
Mar 16th, 2007 at 11:13am
Print Post  
Good day,

I have a new one related to inplace edit mode and the fonts.

I create my fonts in this fashion -
       m_DescTable.Font = New Font(FontFamily.GenericSansSerif, 10, FontStyle.Regular, GraphicsUnit.World)
       fc.InplaceEditFont = New Font(FontFamily.GenericSansSerif, 9, FontStyle.Italic, GraphicsUnit.World)

and it all works wonderfully when I am at "ZoomToFit", however when I zoom in to any other zoom level the InplaceEditFont does NOT scale.  The display font scales just fine.

Any ideas?  I may have missed something somewhere, but I was pretty sure that the font had to be GraphicsUnit.World in order to scale with zooming.

Should I do some InplaceEditFont scaling when I zoom in and out??

Thanks,
Jeff
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InplaceEdit font and zooming
Reply #1 - Mar 16th, 2007 at 11:39am
Print Post  
Good day,

Yes, you will need to scale the font yourself. You could handle the EnterInplaceMode event and set a new font whose size is the base size multipled by Zoom/100.

FlowChart.NET does not apply scaling transformation to the TextBox used for inplace editing, so the World unit does not help there.

Stoyan
  
Back to top
 
IP Logged
 
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Re: InplaceEdit font and zooming
Reply #2 - Mar 16th, 2007 at 2:11pm
Print Post  
Thanks Stoyan,

That was exactly what I needed.  Well, almost.  I was calling BeginInPlaceEdit from code and was not getting the event at the right time, so I scaled the font BEFORE calling BeginInPlaceEdit.

Jeff
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint