Veldehar
March 13th, 2010, 14:17
I have recently been making all of the RMC Character law equipment lists drag and drop and ran into an interesting issue on longer tables. First, here is the base piece of code I am working with:
<windowlist name="wpnlist">
<bounds>15,52,-19,-15</bounds>
<class>referenceweaponlist_entry</class>
<datasource>.list</datasource>
<script>
function onListRearranged()
local alt = true;
--[[ set row shading ]]
for i,win in ipairs(getWindows()) do
if alt then
win.setFrame("rowshade");
end
alt = not alt;
end
end
</script>
</windowlist>
Now if I insert a footnote after the windowlist like so:
<formattedtextfield name="footnote">
<anchored>
<top>
<anchor>bottom</anchor>
<offset>-60</offset>
</top>
<left>
<anchor>left</anchor>
</left>
<right>
<anchor>right</anchor>
</right>
</anchored>
<font>
<normal>chatfont</normal>
<bold>narratorfont</bold>
<italic>chatitalicfont</italic>
<bolditalic>chatbolditalicfont</bolditalic>
<title>defaultstringcontrol</title>
</font>
<linkicon>
<link>button_openwindow</link>
<emptylink>button_emptytarget</emptylink>
</linkicon>
<selectioncolor>#FFD296</selectioncolor>
</formattedtextfield>
I get a footnote statically attached to the bottom and the window, and the data will still scroll, but naturally this isn't how I want the footnote attached. So, then I go ahead and change the:
<bounds>15,52,-19,-15</bounds>
to
<anchored>
<top>
<parent>lblInum</parent>
<offset>1</offset>
<anchor>bottom</anchor>
</top>
<left>
<offset>15</offset>
<anchor>left</anchor>
</left>
<right>
<offset>-19</offset>
<anchor>right</anchor>
</right>
</anchored>
At this point, my footnote is still in the wrong place, and the data will still scroll. So, to get the footnote into the correct position, attached to the bottom of the table's data, I simply change the footnotes anchor to "wpnlist" or "lblInum" and!
the table no longer scrolls, so if the table is a long one, you can't see it all.
Hopefully this makes sense to someone, so they can let me know how to fix this, or to drop it, because it is just that way, LOL.
Veldehar
<windowlist name="wpnlist">
<bounds>15,52,-19,-15</bounds>
<class>referenceweaponlist_entry</class>
<datasource>.list</datasource>
<script>
function onListRearranged()
local alt = true;
--[[ set row shading ]]
for i,win in ipairs(getWindows()) do
if alt then
win.setFrame("rowshade");
end
alt = not alt;
end
end
</script>
</windowlist>
Now if I insert a footnote after the windowlist like so:
<formattedtextfield name="footnote">
<anchored>
<top>
<anchor>bottom</anchor>
<offset>-60</offset>
</top>
<left>
<anchor>left</anchor>
</left>
<right>
<anchor>right</anchor>
</right>
</anchored>
<font>
<normal>chatfont</normal>
<bold>narratorfont</bold>
<italic>chatitalicfont</italic>
<bolditalic>chatbolditalicfont</bolditalic>
<title>defaultstringcontrol</title>
</font>
<linkicon>
<link>button_openwindow</link>
<emptylink>button_emptytarget</emptylink>
</linkicon>
<selectioncolor>#FFD296</selectioncolor>
</formattedtextfield>
I get a footnote statically attached to the bottom and the window, and the data will still scroll, but naturally this isn't how I want the footnote attached. So, then I go ahead and change the:
<bounds>15,52,-19,-15</bounds>
to
<anchored>
<top>
<parent>lblInum</parent>
<offset>1</offset>
<anchor>bottom</anchor>
</top>
<left>
<offset>15</offset>
<anchor>left</anchor>
</left>
<right>
<offset>-19</offset>
<anchor>right</anchor>
</right>
</anchored>
At this point, my footnote is still in the wrong place, and the data will still scroll. So, to get the footnote into the correct position, attached to the bottom of the table's data, I simply change the footnotes anchor to "wpnlist" or "lblInum" and!
the table no longer scrolls, so if the table is a long one, you can't see it all.
Hopefully this makes sense to someone, so they can let me know how to fix this, or to drop it, because it is just that way, LOL.
Veldehar