Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic lane grid (Read 1524 times)
thgr
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Mar 9th, 2007
lane grid
Apr 13th, 2007 at 6:19am
Print Post  
Hi,

In a lane grid i try to change the color of a cell
and to attach a table in another.
In both cases it changes tha color of the cell to Black And it shows the table i create in the cell Black too.

Any idea what i'm doing wrong?

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: lane grid
Reply #1 - Apr 13th, 2007 at 7:01am
Print Post  
What code do you use in order to change the color of the cell and create the table?

Meppy
  
Back to top
 
IP Logged
 
thgr
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Mar 9th, 2007
Re: lane grid
Reply #2 - Apr 13th, 2007 at 7:11am
Print Post  
       Dim _grid As Grid = Me.theGraph.LaneGrid

       _grid.ColumnCount = 3
       _grid.RowCount = 3
       _grid.GetRow(1).Height = 80
       _grid.GetRow(0).Height = 80
       _grid.GetRow(2).Height = 80
       _grid.GetColumn(0).Width = 80
       _grid.GetColumn(1).Width = 80
       _grid.GetColumn(2).Width = 80

       Dim a As New MindFusion.Diagramming.WinForms.Lanes.Style

       _grid.HookHeaders = False
       '        _grid.HeadersOnTop = False
       a.BackgroundBrush = New MindFusion.Drawing.SolidBrush(KnownColor.Violet)
       _grid(1, 2).Style = a

       _MASTER_NOTE_X_COOR = _grid.GetCellBounds(_grid(1, 1)).Location.X
       _MASTER_NOTE_Y_COOR = _grid.GetCellBounds(_grid(1, 1)).Location.Y

       _ENTRY_MASTER_X_COOR = _ENTRY_MASTER_X_COOR - 20
       _ENTRY_MASTER_Y_COOR = _ENTRY_MASTER_Y_COOR - 10
     
  For Each _note As NoteProxy In theModel.AllNodesQ

  ' Creates a table and Adds the table in a cell
           If _note.EntryGID.Equals(CType(theModel.MasterNote, NoteProxy).EntryGID) Then
               CreateMasterNote(_note)
           
           End If
       Next

       Me.theGraph.EnableLanes = True
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: lane grid
Reply #3 - Apr 13th, 2007 at 12:57pm
Print Post  
For some reason this code compiles under VB, although the MindFusion.Drawing.SolidBrush constructor does not accept parameter of type KnownColor. I assume that VB performs some kind of implicit conversions between the KnownColor enumeration and Color. Try the following substitution instead:

Code
Select All
a.BackgroundBrush = New MindFusion.Drawing.SolidBrush(Color.FromKnownColor(KnownColor.Violet)) 


Check the same when applying a brush to the table objects you are using.

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint