Background color in NUIDocuments


Author
Message
Tomas Vera
Tomas Vera
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)
Group: Forum Members
Posts: 6, Visits: 1
Hello All (newbie),
I want child controls added to my Document manager to have a transparent background.

My main form has a background image that I want to show through when I add child controls using the DocumentManager.

On a windows form I can simply state "BackgroundColor = Color.Transparent".

What's the equivalent operation to documents added to my document manager?

Thanks in advance,
-tomas

Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Tomas,

When DocumentManager’s is in SingleDocument view, NUIDocument resides in NSingleDocumentHost.

NSingleDocumentHost is ContainerControl which Controls[0] is the Panel that NUIDocument wraps.

To be able to make NSingleDocumentHost therefore NUIPanel transparent you should set its ControlStyle.SupportTransparentBackColor with conjunction with ControlStyle.UserPaint to true using SetStyle method in order to be able to set NSingleDocumentHost.BackColor to be transparent. Otherwise you will get an ArgumentException which said that control does not support transparent background color.

Sinse SetStyle is protected method, you should override it or call it in some place in the class, so you should create a new class that derives from NSignleDocumentHost, but this is not possible because NSingleDocumentHost is internal. So I am afraid that you cannot achieve the desired state.



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search