you either append something to draw to an existing panel like in your first code snippet. Or you do your own panel. Why would you want to create a custom panel and append/prepend it to an existing one? It’s not possible, it would give you a panel inside of another panel.
what exactly I’m want to do is to put my panel ontop of the particle tab , not in the bottom.
Ontop or between two existing panels. But it’s not seem possible.
Yes ,RickyBlender, your right, rewrite and replace existing panel can be a solution but not the best.
CoDemanx , thanks for the link but the first solution is exactly what I’m doing in my first example and second solution is like what RickyBlender talk about.
was looking in my notes file and found this simple example for adding in draw function
if you ask on irc you might get lucky!
but don’t really remember anything for panels as such
seen another example for items with a menu but not for a panel!
panels are taken care by the GUI in blender internal and no control over it
did not follow but there is this GSOC project on GUI which might give more control for panels maybe!
check it out
appending and prepending is just to extend an existing panel, it influences the draw method of that panel. You must not use this to place your own panel at the top.
Where a panel shows up, seems to be related to the order of script loading. bl_ui scripts are therefore at the very top, and (most) addon panels at the bottom. There is currently no way to change this order but to move them with the mouse.