Forum > BGRABitmap and LazPaint
Cannot create Clear BCPanel at run time
Josh:
Hi
Odd, hopefully i am doing something stupd.
I cannot create a BCPanel (0 Opacity Color clear) at runtime,I can create one at designtime, but runtime it appears as black.
Project attached, click the button to create it.
winni:
Hi!
I get the same result like you got.
But with playing around with the dynamic created BCPanel I got a trace where the faulty behaviour starts:
The assigning of the parent does not seem to work.
Try after assigning the parent :
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---ShowMessage (parent.name);
This code crashes - the parent is still Nil.
Winni
Josh:
hi winni
its odd,
if you create with nil, then assign parent to form1, you get memory leak on close (so created bcpanel cant be part of the form container).
if you create with Form1 ( and no parent assigning) you get black, no mem leak on closing
if you create with self and assign and assign parent you get black, no mem leak on closing
something is up with this control...?
lainz:
BCPanel can't be transparent because is a TControl descendant.
Josh:
hi lainz,
ok, so why when created a design time, with the same properties i get clear panel, but at runtime i get a black panel ?
Navigation
[0] Message Index
[#] Next page