Hi, \n I want to change the style of the cell when selected. Here's an idea of I want to do:

\n
\nif(cell!=null){\n                        if(cell.isVertex()){\n                            cell.setStyle(defaultStyle+";strokeColor=#FE0202");\n                            for (int i=0; i < cell.getEdgeCount(); i++){\n\ncell.getEdgeAt(i).setStyle(defaultStyle+";strokeColor=#FE0202");\n                            }\n\n}\n                    }\n\n
\n\n

I tried surrounding the code with beginUpdate() and endUpdate(). \nBut I dont get it to repaintthe graph.

asked 20 May '11, 06:01

sednus's gravatar image

sednus
1015
accept rate: 0%

edited 20 May '11, 06:02


Use mxGraphModel.setStyle(cell, style)

link

answered 20 May '11, 07:11

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Thanks a lot

(20 May '11, 07:47) sednus
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×228
×50
×29

Asked: 20 May '11, 06:01

Seen: 1,737 times

Last updated: 20 May '11, 07:47