Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Zig zag style layout (Read 1586 times)
omarko
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Mar 3rd, 2009
Zig zag style layout
Mar 3rd, 2009 at 5:44pm
Print Post  
Hi, i'm trying to setup a layout to go from side to side, e.g

1  2  3

6  5  4

7  8  9

any body any ideas on how i can achieve this?

Thanks in advance  Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zig zag style layout
Reply #1 - Mar 3rd, 2009 at 6:44pm
Print Post  
Hi,

For each node set its Bounds like this:

float row = nodeIndex / numColumns;
float col = nodeIndex % numColumns;
float x = (row % 2 == 1) ?
     (numColumns - col - 1) * columnWidth :
     col * columnWidth;
float y = row * rowHeight;
node.Bounds = new RectangleF(
     x, y, columnWidth, rowHeight);
           
I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
omarko
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Mar 3rd, 2009
Re: Zig zag style layout
Reply #2 - Mar 5th, 2009 at 10:50am
Print Post  
Thats got me started, thanks  Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint