Write text into MarvinViewControl

User 2db0d566ee

13-07-2016 07:57:19

How I can write text and manage its position in a MarvinViewControl?

ChemAxon 2e7d8629fa

13-07-2016 11:24:45

 Dear Alfonso,


 


MarvinViewControl handles molecules only, you cannot add simple text to that. If you open Marvin Sketch using double click on MarvinViewControl you can add text box to the canvas where you can define any text (Insert -> Text menu item). Why do you need to insert text into MarvinViewControl? What is your workflow? Could you describe me the purpose of this insertion?


 


Thank you.


 


Regards,


Gergely

User 2db0d566ee

13-07-2016 11:44:10

The pourpose of this is to put the final atoms values of an atom calculations like in the output of properties calculation.

ChemAxon 2e7d8629fa

13-07-2016 13:09:42

 Hi,


 


MarvinViewControl does not support this scenario at this moment.


For a workaround you can get the image of the molecule and render the calculated values onto the image.


Image img = molecule.Renderer.RenderToImage(ImageFormat.Png);
Graphics g = Graphics.FromImage(img);


Use this Graphics object for further rendering.


 


I hope it helps.


 


Regards,


Gergely

User 2db0d566ee

14-07-2016 18:36:08

Thanks, but I use visualbasic and not c#

ChemAxon 990acf0dec

18-07-2016 12:05:12

Dear Alfonzo,


I hope you can convert it to visual basic.


Best regards,


Akos