Not getting replies on my question made me doubt my question,
so I found a solution. I think.
It works very well, but I feel I'll have to revisit this
when I get better at this programming thing.
I took the disclosuretriangles out of the containers, thus solving
the stupid problem I had created. Now I can trigger the right
behavior using the triangle's action handler.
And this code I put in every triangle, but with only the code
applying to itself and those controls below it.
The obvious disadvantages are:
- I have to know the amount of controls beforehand
- this is a lot of code and there's no method I can refer to in
every triangle instead of putting something very similar in every
triangle handler
If you have any comments, please feel free! Thanks.
Dim DT1, DT2, DT3, DT4, DT5, DT6, DT7, DT8, DT9 As DisclosureTriangle
DT1=DisclosureTriangleAD1
DT2=DisclosureTriangleAD2
DT3=DisclosureTriangleAD3
DT4=DisclosureTriangleAD4
DT5=DisclosureTriangleAD5
DT6=DisclosureTriangleAD6
DT7=DisclosureTriangleAD7
DT8=DisclosureTriangleAD8
DT9=DisclosureTriangleAD9
Dim st2, st3, st4, st5, st6, st7, st8, st9 as StaticText
st2=StaticTextAD2
st3=StaticTextAD3
st4=StaticTextAD4
st5=StaticTextAD5
st6=StaticTextAD6
st7=StaticTextAD7
st8=StaticTextAD8
st9=StaticTextAD9
dim cc2,cc3,cc4,cc5,cc6,cc7,cc8,cc9 As ContainerControl
cc2=ContainerControlArtDetail2
cc3=ContainerControlArtDetail3
cc4=ContainerControlArtDetail4
cc5=ContainerControlArtDetail5
cc6=ContainerControlArtDetail6
cc7=ContainerControlArtDetail7
cc8=ContainerControlArtDetail8
cc9=ContainerControlArtDetail9
if me.Value=false then
ContainerControlArtDetail1.Visible=False
if DT2.Top > DT1.Top+30 Then
DT2.Top=DT1.Top+30
end if
if DT2.Value=true then
DT3.top=DT2.Top+290
else
DT3.Top=DT2.Top+30
end if
if DT3.Value=true then
DT4.top=DT3.Top+290
else
DT4.Top=DT3.Top+30
end if
if DT4.Value=true then
DT5.top=DT4.Top+290
else
DT5.Top=DT4.Top+30
end if
if DT5.Value=true then
DT6.top=DT5.Top+290
else
DT6.Top=DT5.Top+30
end if
if DT6.Value=true then
DT7.top=DT6.Top+290
else
DT7.Top=DT6.Top+30
end if
if DT7.Value=true then
DT8.top=DT7.Top+290
else
DT8.Top=DT7.Top+30
end if
if DT8.Value=true then
DT9.top=DT8.Top+290
else
DT9.Top=DT8.Top+30
end if
else
ContainerControlArtDetail1.Visible=True
DT2.Top=DT1.Top+290
DT3.Top=DT2.Top+30
DT4.Top=DT3.Top+30
DT5.Top=DT4.Top+30
DT6.Top=DT5.Top+30
DT7.Top=DT6.Top+30
DT8.Top=DT7.Top+30
DT9.Top=DT8.Top+30
end if
st2.Top=DT2.top
st3.Top=DT3.top
st4.Top=DT4.top
st5.Top=DT5.top
st6.Top=DT6.top
st7.Top=DT7.top
st8.Top=DT8.top
st9.Top=DT9.top
cc2.Top=st2.Top+32
cc3.Top=st3.Top+32
cc4.Top=st4.Top+32
cc5.Top=st5.Top+32
cc6.Top=st6.Top+32
cc7.Top=st7.Top+32
cc8.Top=st8.Top+32
cc9.Top=st9.Top+32
Koen van Hees
Les Allées de St. Genis
299 Allée Diderot
01630 St Genis Pouilly
France
tel: +33 (0)4 50 42 08 78
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>