Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 SPC Control Chart Tools for .Net
 Font size issue

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
gsoldavi Posted - 30 Jan 2017 : 04:50:19
Dears,

I'm facing with a strange behavior on SPC charts. I have a User Control developed with Vb.NET. This control is dinamically instantiated by code many times and added on TabControl pages (one control per page).
Everything is working perfectly except the very first UC instance! The first one is presented with big fonts instead of the others with the correct dimension.

What could it be? How can I solve this issue?
Thank you.
BR
Giorgio
6   L A T E S T    R E P L I E S    (Newest First)
gsoldavi Posted - 14 Feb 2017 : 03:39:18
Ok thank you.
I prepare a small project and send it to you.
quinncurtis Posted - 11 Feb 2017 : 10:57:34
Sorry, we cannot reproduce the problem with SPCGeneralizedTableDisplay.DefaultTableFont. We placed in the SPCApplication1 program before the call to InitSPCTimeVariableControlChart and it worked as expected.

Dim numdatapointsinview As Integer = 17

SPCGeneralizedTableDisplay.DefaultTableFont = New Font("Arial", 16)

' Initialize the SPCTimeVariableControlChart
Me.InitSPCTimeVariableControlChart(charttype, numsamplespersubgroup, numdatapointsinview, timeincrementminutes)

Test this on your end. If it works see if you can modify the program to reproduce your problem. If you are unable to do that, you are going to have to supply us with the complete source to the simplest possible example (project) which reproduces the problem. You can send the zipped example project to support@quinn-curtis.com.

gsoldavi Posted - 10 Feb 2017 : 12:36:49
Hi!
Based on what you said I've found two things:
a. it seems that, after Control.Add(objChart), at very first time, the object is set back to the UC size defined on User Control (despite the code settings). Anyway setting again the size AFTER Control.Add it seems working better.
b. Even the resize works better font size is not customized: I'm setting "SPCGeneralizedTableDisplay.DefaultTableFont" before Init but seems not working.

Please can you help me on setting font correctly?
quinncurtis Posted - 31 Jan 2017 : 08:46:33
Events often don't get fired in the correct order so don't rely on that. Your first chart gets defined and rendered while it still has a default user control size of 100x100, but then it is resized to the windows size, causing fonts to resize proportionately. So give it a default preferred size which is your expected window size. It doesn't have to be exact, just ball park to give font resizing algorithm a starting point. Do it BEFORE you add it to a form, probably in the chart definition method.
gsoldavi Posted - 31 Jan 2017 : 08:16:37
Is it the size of the control?
Actually UserControl Dock property is Fill, should I calculate it and set during a particular event on form (I'm thinking about Show event)?
quinncurtis Posted - 30 Jan 2017 : 16:47:41
In the chart definition, define the expected size before the first chart is displayed using the ChartView PreferredSize property.

chartVu.PreferredSize = New Size(1200, 800)


Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07