Forum Replies Created
-
AuthorPosts
-
HeDiBoParticipant
First tests in 15.09 suggest you’ve made it ๐
HeDiBoParticipantNo change in 15.09
HeDiBoParticipantIt’s actually very nice you had this. This proves that a previous version of AC went OK.
Thank you for your efforts.HeDiBoParticipant<p zoompage-fontsize=”14″>I think youโll have better control with a TsBitBtn
Why should I use a different button?
This worked before, but it’s hampered in AC 15.08 (the distance between image and caption has become larger).June 4, 2020 at 6:27 pm in reply to: Thumbnailcache-Error in OpenDialog only with active AlphaControls Skinprovider #68903HeDiBoParticipantI tried your project without a problem.
I’m inclined to think it’s a Windows problem. You’re running the same Windows version I have. But AC put a lot of work into showing Windows dialog in native skin. There must be a reason for this. Even if I change sSkinManager1.Options.ChangeSysColors to True, things still work.
My advice would be to go to AC version 15.08 Although it’s labeled beta, it’s very stable already.June 1, 2020 at 7:05 pm in reply to: Thumbnailcache-Error in OpenDialog only with active AlphaControls Skinprovider #68896HeDiBoParticipantThere are so many things that could be the reason.
Please, add a sample project illustrating the problem.
Fyi: in AC 15.08 I could not replicate this problem.HeDiBoParticipantPersonally, I donโt see the difference between this TacLayout and a simple flat TsPanel.
There is no difference (yet). It is just an easy way: no hassle with setting SkinDate and other stuff, also the border at design time is handy (you don’t have to guess at design time where the panel is).
HeDiBoParticipantHi Serge,
There is a reason why I called the component TacLayout. That would leave the possibility to include a TsLayout component in the package.
Are you willing to do so?HeDiBoParticipantCan you also add a bit of code to change the Header font?
HeDiBoParticipantThis is the result:
unit acLayout; {$i sDefs.inc} interface uses System.SysUtils, System.Classes, Vcl.Controls, Vcl.ExtCtrls, sPanel; type TacLayout = class(TsCustomPanel) public constructor Create(AOwner: TComponent); override; property DockManager; published property Align; property Anchors; property AutoSize; property Constraints; property UseDockManager default True; property DockSite; property DoubleBuffered; property DragCursor; property DragKind; property DragMode; property Enabled; property FullRepaint; property Locked; {$IFDEF D2010} property Padding; property ParentDoubleBuffered; property Touch; property VerticalAlignment; property OnAlignInsertBefore; property OnAlignPosition; property OnGesture; property OnMouseActivate; {$ENDIF} property ParentShowHint; property PopupMenu; property ShowHint; property TabOrder; property TabStop; property Visible; property OnCanResize; property OnClick; property OnConstrainedResize; property OnContextPopup; property OnDockDrop; property OnDockOver; property OnDblClick; property OnDragDrop; property OnDragOver; property OnEndDock; property OnEndDrag; property OnEnter; property OnExit; property OnGetSiteInfo; property OnMouseDown; property OnMouseMove; property OnMouseUp; property OnResize; property OnStartDock; property OnStartDrag; property OnUnDock; property OnMouseEnter; property OnMouseLeave; end; implementation { TacLayout } uses Forms; constructor TacLayout.Create(AOwner: TComponent); begin inherited; SkinData.SkinSection := 'TRANSPARENT'; BevelEdges := [beLeft, beTop, beRight, beBottom]; BevelInner := bvNone; BevelOuter := bvNone; BorderWidth := 0; BorderStyle := bsNone; Caption := ' '; ParentCtl3D := False; Ctl3D := False; {$IFDEF D2010} ShowCaption := False; {$ENDIF} {$IFDEF DELPHI7UP} ParentBackground := True; {$ENDIF} ParentFont := False; SideShadow.Mode := ssmNone; if csDesigning in ComponentState then BevelKind := bkFlat else BevelKind := bkNone; end; end.
Although the skin says TRANSPARENT the control is not really totally transparent. If you move a TacLayout on top of another control, it will still obscure the covered control.
What is needed here is a type of glass effect. I’m not sure how to accomplish that.
Serge, can you help me out?HeDiBoParticipantI know now why this is such a pain. Every component that is created at design time gets its properties listed in the dfm file. That file is streamed in by the Reader AFTER the creation. Because on design time, the BevelKind is bkFlat, that is the value streamed to the dfm file. At run time, the property is set to bkNone during the component’s create event, but after that its properties are loaded in by the Reader and reset to bkFlat.
So, the TacLayout component should inherit from TsCustomPanel, where the properties are not published, and selectively publish the properties needed. If Bevelkind is not published, it will not be streamed in by the Reader and all’s well.
I’ll study which properties are needed for the TacLayout component and make a better one.HeDiBoParticipantLoaded procedure is only called if the component is streamed in with the form. If it is created dynamically in code, the Loaded procedure is not called. So, this solution may work, but is by no means foolproof.
HeDiBoParticipantSerge,
Why is the BevelKind property changed after the Create constructor?
And why does this even work. Is Loaded not called at design time?
Thank you for clarifying this.HeDiBoParticipantFor some reason the BevelKind is bvNone at design time. I don’t know any more where to set it. Maybe Serge can help here.
HeDiBoParticipantI must disagree with you, TLayout is by no means a light component.
You may find the following lightweight component useful:unit acLayout; interface uses System.SysUtils, System.Classes, Vcl.Controls, Vcl.ExtCtrls, sPanel; type TacLayout = class(TsPanel) private { Private declarations } protected { Protected declarations } public constructor Create(AOwner: TComponent); override; procedure Loaded; override; published { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Samples', [TacLayout]); end; { TacLayout } constructor TacLayout.Create(AOwner: TComponent); begin inherited; SkinData.SkinSection := 'TRANSPARENT'; BevelOuter := bvNone; Ctl3D := False; ShowCaption := False; ParentCtl3D := False; ParentFont := False; // Although the following would make sense, after the Create event // ... apparently the BevelKind property is reset again during load. // ... So this logic is moved to after the Loaded event. // if csDesigning in ComponentState then BevelKind := bkFlat // else BevelKind := bkNone; end; procedure TacLayout.Loaded; begin inherited; // Moved from Create event: if csDesigning in ComponentState then BevelKind := bkFlat else BevelKind := bkNone; end; end.
Hope this helps.
HeDiBoParticipantWhy do you think the use of TPanel with Transparent skin is inferior to a layout setup?
HeDiBoParticipantI didn’t realize the big difference between characters, being vectors, and my icons, being bitmaps.
Still it is an interesting idea to have bitmaps that become negative on dark skins.May 21, 2020 at 1:42 pm in reply to: AC15.03: TsDateEdit calls OnAcceptDate way too many times #68833HeDiBoParticipantIn AC15.08 you solved this problem ๐
Please close this topic.HeDiBoParticipantIn 15.08 you apparently have done some work on this.
The OnMouseEnter and OnMouseLeave events do not work yet. Also the X,Y coordinates in OnMouseMove are incorrect. So, do you expect it to start working in a next release?HeDiBoParticipantYou seem to have found a solution in AC 15.08. Congrats ๐
-
AuthorPosts