mviewpane label

User 48b145d3f5

07-02-2011 21:58:13

Hello,


I am integrating an mviewpane into a java application and I'd like to set some labels in mviewpane.


I've tried to use


mviewPane.setL(0,"mylabel")


but this will return an error which seems very odd (illegal division by 0).


What should I do to display the label?


Thank you,


Francesca

ChemAxon 7c2d26e5cf

08-02-2011 16:16:28


Have you been specified the layout for the table? The MViewPane.setL method has sense only in grid (molecule matrix) view.


The following example demonstrates how to specify the layout for MViewPane in grid view.


MarvinView Table View Example with Parameters


User 48b145d3f5

07-03-2011 22:12:05

Hi Tamas,


thanks for your reply.


I've try to add the layout as in the example



mviewPane.setParams(


 


// set total row count

 


"rows="+1+"\n"

 


// set visible row count

+


"visibleRows="+1+"\n"

 


// set column count

+


"cols="+1+"\n"

 


// visible column count

+


"visibleCols="+1+"\n"

);



mviewPane.setL(0,



"test");



but I still get the illegal division by zero error. The error is caused by  mviewPane.setL(0, "test");


ChemAxon 7c2d26e5cf

08-03-2011 17:19:07

You have to specify the cell and param parameters too as it is described in the referred example.


MarvinView Table View Example with Parameters

User 48b145d3f5

08-03-2011 20:15:35

Thanks, it works now