Forum Replies Created
-
AuthorPosts
-
November 29, 2012 at 2:29 pm in reply to: TLabel with Align=alClient causes Form to misbahave #49497ralfiiiParticipant'Support' wrote:
When you activates a skin? In the form OnShow/OnCreate or in design-time?
In OnCreate.
November 28, 2012 at 2:50 pm in reply to: Docked form (BorderStyle=bsNone) suddenly gets border #49473ralfiiiParticipant'ralfiii' wrote:A workaround seems to be to put a SkinProvider-Component on the docked form and sert SkinData.SkinSection to “CHECKBOX”.
But that leads to a real CATASTROPHIC bug.
I create such a form (in a panel) – see 01_Ok.png.
Then I maximize the parent form. As a result the new area of the docked form is not skinned at all. (see 02_Maximized_Fail.png).
Very irritating: The sequence of OnResize and OnPaint is inverted for the docked form.
So when I maximize the Mainform this is the sequence of events:
DockedForm.OnPaint
DockedForm.OnResize <- this should be called BEFORE the paint, not after it. I suppose this is the cause for that bug. MainForm.OnResize MainForm.OnPaint A little app demonstrating this is attached. Tested with V8.10 – reproducable. Help!!!
November 28, 2012 at 11:23 am in reply to: Docked form (BorderStyle=bsNone) suddenly gets border #49472ralfiiiParticipantA workaround seems to be to put a SkinProvider-Component on the docked form and sert SkinData.SkinSection to “CHECKBOX”.
November 28, 2012 at 8:47 am in reply to: Docked form (BorderStyle=bsNone) suddenly gets border #49470ralfiiiParticipant'mol' wrote:I know this doesn't resolve the bug, but still (out of curiosity): why do you guys use forms and not TFrames?
I use frames whenever I need “component-like” functionality, i.e. a couple of components+code instanced a couple of times.
In this case I use Forms because the module can be docked (without border), or the module can “live free” as normal free floating Forms (with Border). And a TFrame is missing the OnPaint-event which I need.
Ralf
ralfiiiParticipantHamilton,
yes, this issue is resolved now!
Thanks!
ralfiiiParticipantMaybe also worth mentioning: The 8.03 version now needs the Vclie*.bpl package (Webbrowser components) – just in case you deploy your application using packages.
ralfiiiParticipantbug still there in v8.02
ralfiiiParticipant'Support' wrote:Thank you for the demo! :a3:
Will be fixed on this week.
V8.01 fixes the problem, thanks!
You have really a TOP TOP TOP support, thanks for your quick and friendly help!
ralfiiiParticipant'Support' wrote:Try this patched file please
It works!
Thanks!!!
August 16, 2012 at 7:53 am in reply to: Form.OnPaint called too late – overwrites other content #48777ralfiiiParticipantVersion 7.68 solves this problem.
Thanks a lot Serge!!!
July 26, 2012 at 9:07 am in reply to: Form.OnPaint called too late – overwrites other content #48673ralfiiiParticipantAny news on that?
*push*
ralfiiiParticipant'Ralph' wrote:Your system says I am 'not permitted to upload this kind of file'.
zip it.
ralfiiiParticipant'Ralph' wrote:Finding the error on a form this complex would be too time consuming. I believe that the problem was caused by one of the components not getting its parent property set correctly when added to the form. I may have to switch to another skinning product.
I tried quite a lot of different skinning solutions before I found AC. I didn't find another one that was as good as this one.
Do you create the controls on that form at runtime?
And, regarding time-comsuming: My product is a humongous thing. Still thinning the app out to a skeleton that still shows the problem is just a matter of minutes. And then you suddenly delete something or change something and the sknning works again. That's were you can start to dig. Again, as I said, normally a matter of minutes, maybe one hour.
In your case you don't even need to let the “switch skin”-code survive. If you open a form the controls have to be skinned. If this is not the case this is enough to demonstrate the problem.
Just my 2cents.
Ralf
ralfiiiParticipantHave you placed a SkinProvider-component on the dynamically created form?
I guess nobody can help if it's not reproducable.
Last time I had such a case I copied the project and deleted and deleted and deleted until I found the circumstances that were needed (as a minimum) to show the problem.
Then the guys from AC were really quick in helping me.
Ralf
ralfiiiParticipantI have changed the code for the TsCheckListBox and attached a pic of my current (left) and the normal (right) focus rect and my current focus rect, just to make it easier to understand what my problem is.
Here's the code:
Code:procedure TForm1.sCheckListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
var IsSelected : boolean;
const ColorFieldWidth = 10;
const ColArr : array[0..3] of TColor = (clBlack, clRed, clBlue, clYellow);
begin
IsSelected:=odSelected in State;with (Control as TsCheckListBox) do
begin
// Clear Cell
if IsSelected then
begin
Canvas.Brush.Color:=$00AED7FF;
Canvas.FillRect(Rect);
end;// Draw Colorfield
Canvas.Brush.Color:=ColArr[Index mod 4];
with Rect do
Canvas.FillRect(Classes.Rect(Left+2,Top+2,Left+2+ColorFieldWidth,Bottom-3));// Output Text
Canvas.Brush.Style:=bsClear;
Canvas.Font.Color:=clBlack;
with Rect do
Canvas.TextOut(Left+ColorFieldWidth+7, Top+1, Items[Index]);
end;
end;ralfiiiParticipantYes, I used
Code:Caption:=IntTostr(sAlphaImageList1.Count);
sAlphaImageList1.Clear;
sAlphaImageList1.Items.Clear;
Caption:=Caption+' – '+IntTostr(sAlphaImageList1.Count);And the result is “2 – 2”.
So before and after 2 images.
ralfiiiParticipantThis code doesn't do anything good.
For adding images I found a solution:
Code:with TsImgListItem(imgList.Items.Add) do
begin
ImageFormat := ifPNG;
PixelFormat := pf32bit;
ImgData.LoadFromStream(strmBinInDb);Png := TPNGGraphic.Create;
Png.LoadFromStream(ImgData);
Ico := MakeIcon32(Png);
ImageList_AddIcon(imgList.Handle, Ico);
DestroyIcon(Ico);
FreeAndNil(Png);
end;(…quite a lot of code…)
but Clear still doesn't work at all.
November 24, 2011 at 12:06 pm in reply to: SkinProvider generates range check error on startup #47242ralfiiiParticipantSuper, thanks!
Best support team ever!
ralfiiiParticipantFound it 🙂
(just 1 minute after posting)
DrawAlphaImgListDC with BlendColor=clNone does the job.
Thanks anyway 🙂
ralfiiiParticipant'Support' wrote:Buttons will be transparent and without borders if the SkinData.SkinSection property changed to 'CHECKBOX'.
I think, that is what you want if I understand you correctly. 🙂
That's a perfect solution, thanks!
-
AuthorPosts