Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Paint outside Ctrl Rect
Re: Paint outside Ctrl Rect [message #23819 is a reply to message #23809] Tue, 24 November 2009 15:01 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
koldo wrote on Mon, 23 November 2009 11:36

Hello mrjt

Unfortunately the control is clipped too with OverPaint().

Best regards
Koldo


Ctrl view is. Its Frames are not.

Frankly, your request is quite specific, it makes the whole paradigm upside-down. Anyway, we had similar problem in the past as X11 input fields paint outside too. But that is just frame...

In practice, I do no undestand why you would want something like that... It is like requiring regular host platform windows to paint one over another.

But I guess you should be able to reuse frame overpaint to this:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct OverCtrl : public Ctrl, public CtrlFrame {
	virtual void FrameAddSize(Size& sz) {}
	virtual void FrameLayout(Rect& r) {}
	virtual void FramePaint(Draw& w, const Rect& r) {
		w.DrawRect(r.left - 10, r.top - 10, r.GetWidth() + 20, r.GetHeight() + 20, Blue());
		w.DrawRect(r, Red());
	}

	virtual int OverPaint() const { return 10; }
	
	OverCtrl() {
		SetFrame(*this);
	}
};

GUI_APP_MAIN
{
	OverCtrl ctrl;
	TopWindow win;
	
	win.Add(ctrl.LeftPos(40, 40).TopPos(40, 10));
	
	win.Run();
}




Mirek
 
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
Read Message
Previous Topic: Calling windows not in main.cpp
Next Topic: up & down within ColumnList moves focus out
Goto Forum:
  


Current Time: Mon Jun 16 21:47:57 CEST 2025

Total time taken to generate the page: 0.04353 seconds