- This topic has 3 replies, 2 voices, and was last updated 12 years, 10 months ago by Support.
-
AuthorPosts
-
January 16, 2012 at 1:40 pm #34999RonaldParticipant
Hello,
At the moment I'm evaluating the lite-version of AlphaControls for Delphi2007. I have some questions an/or requests:
– Would it be possible to restrict skinning to the borders and title of a form? So, not to any component or the form itself.
– I have many forms which only resize in height. Can this be done when skinned? Maybe an option like NoReSizing, ReSizeVert, ReSizeHorz and ReSizeBoth. The cursor may not change is resize in a chosen direction is not possible!
– When I do want to skin all of the form and I'm using thirdparty (or selfmade) components which are not supported, can I skin them myself? Or would this be very difficult.
TIA,
Ronald
January 23, 2012 at 7:58 am #47625SupportKeymasterHello
'Ronald' wrote:– Would it be possible to restrict skinning to the borders and title of a form? So, not to any component or the form itself.Try to use the TsSkinProvider.DrawNonClientArea property
Quote:– I have many forms which only resize in height. Can this be done when skinned? Maybe an option like NoReSizing, ReSizeVert, ReSizeHorz and ReSizeBoth. The cursor may not change is resize in a chosen direction is not possible!Behaviour of skinned form is equal to standard, so you can use constraints and other standard properties.
Quote:– When I do want to skin all of the form and I'm using thirdparty (or selfmade) components which are not supported, can I skin them myself? Or would this be very difficult.You can try to add your control into TsSkinManager.ThirdParty property (case sensitive). There you can choose a type of skinning for a control. If your component is inherited from standard control, then this component may be skinned usually.
January 24, 2012 at 3:28 pm #47639RonaldParticipantWhen I use TsSkinProvider.DrawNonClientArea I get the exact opposite from what I want. I would need something like:
SkinProvider.DrawClientArea := False; // only borders and title are drawn
Your suggestion 'Behaviour of skinned form is equal to standard, so you can use constraints and other standard properties' doesn't work for me. When using a standard delphi-form I'm using the following code to prevent horizontal resizing:
procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
begin
inherited;if Message.Result in [HTLEFT, HTBOTTOMLEFT, HTTOPLEFT, HTRIGHT, HTBOTTOMRIGHT, HTTOPRIGHT] then
begin
Message.Result := HTNOWHERE;end;
end;
The above code doesn't work when the form is skinned! I have tried to use TSkinProvider.OnExtHitText (with similar code) to get the same functionality but that didn't work either.
Any suggestions?
TIA
January 31, 2012 at 6:32 am #47669SupportKeymasterI'll try to change a work of the WM_NCHitTest event in the next relese.
Code for the OnExtHitText event :
Code:procedure TForm1.sSkinProvider1ExtHitTest(var Msg: TWMNCHitTest);
const
CornerWidth = 6;
var
BordWidth, SysBordWidth : integer;
MouseInternalPos : TPoint;
begin
if sSkinProvider1.BorderForm nil then begin
MouseInternalPos.X := Msg.XPos – sSkinProvider1.BorderForm.AForm.Left;
MouseInternalPos.Y := Msg.YPos – sSkinProvider1.BorderForm.AForm.Top;
BordWidth := SkinBorderWidth(sSkinProvider1.BorderForm);
SysBordWidth := SysBorderWidth(Self.Handle, nil, False);
if (MouseInternalPos.X > BorderWidth) and (Msg.XPos <= Self.Left + SysBordWidth + CornerWidth) or
(MouseInternalPos.X = Self.Left + Self.Width – SysBordWidth – CornerWidth) then begin
Msg.Result := HTCLIENT;
end;
end;
end; -
AuthorPosts
- You must be logged in to reply to this topic.