Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Adding a text box in a scatterDraw/ScatterCtrl
Re: Adding a text box in a scatterDraw/ScatterCtrl [message #48103 is a reply to message #47622] Wed, 17 May 2017 12:11 Go to previous messageGo to previous message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi Koldo,
it took me ages to test it... the project was stopped and then it suddenly restarted some weeks ago.

A little bit of context: there is an application used on a couple production lines in the factory I work for. This application registers automatically (in a db) the speed of the production line: the line operate on cables and can treat x meters of cable per minute depending on the type of operation. The machinist, using another applications, enters in the db what is doing (setting up the machine, running the machine...) and what product-id he is working on. The goal is to put together all the information to have a report on the production of each shift. This is the result:

https://pasteboard.co/7jRIiP3B3.png

-Using the standard scatter function AddSeries() I draw the blue line (the speed);
-I created also the green, red yellow, bars (those bars says what the operator is doing: running setting up etc.) with AddSeries(), but with a little trick: it is a very thick line with just two points: the first is the begin of e.g running time, the second is the end;

Now comes in the new method OnPaint; with that method:
-I add a letter on the bars to explains what the bar represents (e.g. 'R' for running);
-I add the product-id that has been processed (e.g. 160997100A-60-2 represents a certain type of cable).

That works very well, the problems come when I print or scroll the report:

https://pasteboard.co/7jQzP6HMn.png
https://pasteboard.co/7jStsxNhI.png

When I scroll the report:
-The texts stay "fixed" while the graphs are resized

When I print the report:
-All the texts are very small;
-The bars have rounded edges.

I had a look at the code of the tab "User paint" of the ScatterCtrl_Demo and saw that using scaled font you do not have the same problem I have, so is just a matter of checking the code and understand how scaled font works.

So, the feedback is that the UserPaint callback provides all the needed functionality, it works as expected and has no bugs (consider that the application that generates the report has been used on a daily basis by a couple of users for about 3 weeks and they have not found any problem).

Thanks a lot for your effort!
Regards,
Gio

[Updated on: Wed, 17 May 2017 12:14]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can I use Input method(IM,IME) with Ultimate++?
Next Topic: Save sccatterCtrl to png: resolution
Goto Forum:
  


Current Time: Tue May 06 06:59:04 CEST 2025

Total time taken to generate the page: 0.03170 seconds