You can't draw directly to a panel. Because every object has to be drawable (including Panel), they all have a draw function. If I remember correctly then adding another draw function to draw on top of the panel would give ambigious calls in some situations. I'll look at it again, but if what I remeber is correct then I can't add the possibility easily.
Creating the panel shouldn't be a problem.
The following code works fine for me.
tgui::Window window(sf::VideoMode(800, 600), "TGUI window");
tgui::Panel* panel = window.add<tgui::Panel>();
I can't create a panel in 1.5. Your 1.5 example works but adding panel creation causes a crash. (I tested with a clean version of your library)
Edit:
1.6 doesn't crash, but no panel shows on screen. This code:
tgui::Panel* panel = window.add<tgui::Panel>();
panel->setPosition(100, 100);
panel->setSize(100, 100);
panel->setBackgroundColor(sf::Color::Red);
Edit 2:
Got the panel to show with this code:
tgui::Panel* panel = window.add<tgui::Panel>();
panel->load(500, 500);
panel->setPosition(100, 100);
panel->setBackgroundColor(sf::Color::Red);
Edit 3:
I just skewered the 1.6 code. Tossed the background code and added the setBackgroundTexture function. Also ruined the ChildWindow cause apparently that uses a lot of the panel code. Good thing I won't need that yet...
Edit 4:
Strangest thing, I can create a panel using the altered 1.6 code in an example program. But it crashes when I do the same code in my other application. Hmmmm. Crash line:
m_EventManager.m_Objects.push_back(newObject);
With and exc_bad_access. Maybe I deleted something that shouldn't have been deleted.
Edit 5:
It may not be my changes that are making it crash. I decided to add a label instead of a panel, this code causes it to crash:
tgui::Label* labelUsername = window->add<tgui::Label>();
labelUsername->setText("Username:");
labelUsername->setPosition(200, 100);
Edit 6:
Nevermind. I was using the window object before I set it.