TOPIC: GridFormat, span
#60
GridFormat, span 4 Years, 6 Months ago
Hi,

See this code:

#('Params'
// This is not good
#(Grid(
((Text "A" span:1)(Text)(Text "B" span:1)(Text))
((Text "1" w:200)(Text "2" w:200)(Text "3" w:200)(Text "4" w:200))
), border: 1)
// I want this
#(Grid(
((Text "A" w:435)(Text "B" w:435))
), border: 1)
#(Grid(
((Text "1" w:200)(Text "2" w:200)(Text "3" w:200)(Text "4" w:200))
), border: 1)
)
/*
And, how i can vertical span, like this:
+---+-------+
| | B |
| A +---+---+
| | C | D |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
*/

Thanks!

miroslav
 
 
#61
Re:GridFormat, span 4 Years, 6 Months ago
Here is picture of sample vert span:


Can i do this in Suneido?
 
 
#64
Re:GridFormat, span 4 Years, 6 Months ago
GridFormat doesn't handle vertical spanning but you should be able to do it with Horz and Vert formats.

Code:

(Vert
    (Horz
        A
        (Vert
            B
            (Horz C D)
            )
        )
    (Horz 1 2 3)
    )



The problem with this approach is getting the widths of A = 1, C = 2, D = 3. The easiest is to specify fixed widths. The other problem is this won't have any borders. You may be able to use RectFormat to get borders.

The other option would be to enhance GridFormat to handle vertical spanning, but this will probably be tricky.

Post edited by: andrew, at: 2006/02/20 17:39
 
 
andrew
 
#65
Re:GridFormat, span 4 Years, 6 Months ago
Hi,
What about GridFormat inside GridFormat? Do you try this?

This part is more important (for me):
Code:


#(Grid(
    ((Text "A" w:435)(Text "B" w:435))
), border: 1)
#(Grid(
    ((Text "1" w:200)(Text "2" w:200)(Text "3" w:200)(Text "4" w:200))
), border: 1)


I try with this code:
This is what i want
Code:


#(Grid(
((Text "A" span:1)(Text)(Text "B" span:1)(Text))
((Text "1" w:200)(Text "2" w:200)(Text "3" w:200)(Text "4" w:200))
), border: 1)


Why more that one span in one row dont work?
Sorry for my english!
 
 
#66
Re:GridFormat, span 4 Years, 6 Months ago
Error on message!
Upper code is what i want to get!
Sorry.
 
 
#68
Re:GridFormat, span 4 Years, 6 Months ago
It looks like there are some bugs with span. It does not work correctly even with only one span. We will fix this.

I did not try a grid within a grid - do you have an example?

Note: You should be able to edit your posts if you make a mistake. (Don't worry about your English)
 
 
andrew
 
#70
Re:GridFormat, span 4 Years, 6 Months ago
Hi,
I did try a grid within a grid, but i must finish project and i realize on diferent way. I think, if you fix bug with span, this code will work (i write this from memory):
Code:


Grid(
    ((A)(InsideGrid span:1))
    ((1)(2)(3))
)

InsideGrid:
Grid(
    ((B span:2))
    ((Hline span:2))
    ((C)(Vline)(D))
)



Post edited by: miroslavt, at: 2006/02/21 05:37
 
 
#71
Re:GridFormat, span 4 Years, 6 Months ago
Btw, thanks for Suneido. I was database, foxpro and vfp programmer for about 15 years, and this tool is amazing. I like query language, it's simple and powerfull. Keep working on Suneido!

Post edited by: miroslavt, at: 2006/02/21 05:38