View Single Post
07-09-12, 01:45 AM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Gregity View Post
@Phanx. Is it a problem that one frame might be 1/8 inch high and the next 2 inches high? as long as I can construe the second frame as consuming 16 "rows" ?
Not a problem. You can either:

(a) let the contents of row #1 hang off the bottom of the "actual" row and leave rows #2-15 "empty",

or

(b) let the contents of row #1 hang off the bottom of the "actual" row, and fill in rows #2-15 as usual unless you detect that row #9 has another oversized child, in which case you leave rows #9-15 blank, and put what would have been row #9 on row #16. For example, row #1 has a huge button occuping the right 25%, but rows #2-8 only have text in the left 75%, so they don't need to "clear" the button. Row #9 has another button, so you have to skip ahead to the next row that's "clear".

For a more concrete example, the "use" buttons in the default quest tracker are certainly taller than the height of 1 row of text, but they "hang out" of the row they're attached to, and occupy vertical space in adjacent rows without affecting the actual height of any rows. The default quest tracker isn't a scrolling frame of any kind, but the same principles apply. Objects inside a frame (the row) are not limited to remaining inside the boundaries of that frame.

The click handler should only be set on the "use" button -- not the whole row -- and the button should be drawn above the row in strata or level; if you use "natural" parenting techniques (eg. passing the row as the parent when you create the button via CreateFrame) then the latter will happen automatically.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote