U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » why the ctrl does`t have HWND?
Re: why the ctrl does`t have HWND? [message #46398 is a reply to message #46397] Thu, 05 May 2016 04:08 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
This is a small demonstration. If you resize the mainwindow or move it, you will notice the popup will detach from the ctrl it's faking.

To make it work better, you should write a small control to take care of reset the popup's size/position even visibility when that of the ctrl it's faking has changed. Some of the Ctrl virtual functions you should override could by Layout, State()...

Hopefully someone more knowledgeble will give you a complete list or even a more appropriate way to do that.

#include <CtrlLib/CtrlLib.h>

using namespace Upp;
struct MyApp: public TopWindow
{
	MyApp()
	{
		Add(e.LeftPos(30,600).TopPos(40,400));
	}
	LineEdit e;
	Label l;
	
	
	typedef MyApp CLASSNAME;
};

GUI_APP_MAIN
{
	MyApp a;
	a.MinimizeBox().MaximizeBox().Open();
	a.	l.SetRect(a.e.GetRect()+a.GetScreenRect().TopLeft());
	a.	l.PopUp(&a.e, true, false, false,false);
	a.Run();
	
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DropList color is the same when editable or not
Next Topic: ColumnList clipping problem
Goto Forum:
  


Current Time: Fri Jul 17 19:49:21 GMT+2 2026

Total time taken to generate the page: 0.00735 seconds