Forum Replies Created
-
AuthorPosts
-
January 15, 2015 at 9:29 am in reply to: If I want skin only TsBitButton and skip skinning TForm, only one way- set TsSkinProvider.DrawClientArea = False ? #53002CheshireCatParticipant
Hello Vector,
set the DrawNonClientArea property to False. Alternatively, you can use two skinManager:
sSkinManager1.Active := False for skip controls and
sSkinManager2.Active := True for skinning controls
Example:
Code:sBitBtn1.SkinData.SkinManager := sSkinManager2;CheshireCatParticipantHello John,
the following code should work for you:
Code:uses
DateUtils;var
MyAlphaDateTime : TDateTime;procedure TForm1.FormCreate(Sender: TObject);
begin
//initialize…sDateEdit1.Date := Now;
sTimePicker1.Time := Time;MyAlphaDateTime := sDateEdit1.Date + sTimePicker1.Time;
Label2.Caption := DateTimeToStr(MyAlphaDateTime);end;
procedure TForm1.sDateEdit1Change(Sender: TObject);
begin
MyAlphaDateTime := sDateEdit1.Date + sTimePicker1.Time;
Label2.Caption := DateTimeToStr(MyAlphaDateTime);
end;procedure TForm1.sTimePicker1Change(Sender: TObject);
begin
MyAlphaDateTime := sDateEdit1.Date + sTimePicker1.Time;
Label2.Caption := DateTimeToStr(MyAlphaDateTime);
end;CheshireCatParticipant'Support' wrote:… it's ready and in tests already …
Added the TsSkinManager.Options.ChangeSysColrs property.
Today evening or tomorrow I can give this new package for tests.
Hello Serge,
great news :a3:
I have tried many ways in the last few weeks, but you're just faster 😉
CheshireCatParticipantHello Dick,
when colors are changed in this way, the user of your software should be able to turn off this behavior, for example via a menu option 😉
CheshireCatParticipantWorks correctly in v9.13, many thanks 🙄
CheshireCatParticipantI have just tested it with the Activate and Deactivate events, it works reasonably good, but is of course not an optimal solution.
[attachment=6865:EditSelectionColor.jpg]
Maybe my simple solution can be expanded 😉
Here the source code as a small example:
[attachment=6866:ChangeSysColors.zip]
CheshireCatParticipant'HeDiBo' wrote:In general the standard blue color of the selection highlight is totally wrong for most skins, except for the blueish ones.
The selection color for a edit is always COLOR_HIGHLIGHT / COLOR_HIGHLIGHTTEXT. You can changing the COLOR_HIGHLIGHT value using SetSysColors function, but this will change for all applications. No idea what Microsoft is thinking here …
CheshireCatParticipantYou need only a sTreeView with ImageList and some symbols, but I've attached a big demo 😉
[attachment=6863:TreeViewDemo.zip]
EXE was compiled with Delphi XE2, Win7/64 bit.
Problem exists since v9.12, in previous versions everything was correct!
CheshireCatParticipantThank you, that works. I had only tested it with ASkinDemo before, in the compiled demo is set the wrong section 😉
CheshireCatParticipantYes, the sections were newly added. You can also test it with your improved Skins, for example AlterMetro!
CheshireCatParticipantHello,
you mean something like that?
Code:procedure TForm1.sButton1Click(Sender: TObject);
var
i : integer;
beginfor i := 1 to 4 do
if FindComponent('sLabelFX' + IntToStr(i)) is TsLabelFX then
with FindComponent('sLabelFX' + IntToStr(i)) as TsLabelFX do
Caption := 'My Label ' + IntToStr(i);end;
CheshireCatParticipantHello Chris,
there is a way to remove the button, maybe it will help you:
Code:procedure TForm1.sButton1Click(Sender: TObject);
var
msgDialog: TForm;
begin
msgDialog := CreateMessageDialog('Replace this with the message to be displayed', mtInformation, [mbYes,mbNo]);
try
msgDialog.Caption := 'Title of the dialog';
msgDialog.BorderIcons := []; // Message-Box have no title buttons
msgDialog.ShowModal;
finally
msgDialog.Hide;
msgDialog.Free;
end;
end;CheshireCatParticipantHello and welcome,
take a look at the tutorial section and you'll find Important information about Creating Skins
The editor can be downloaded here: Skin Editor
Have fun … 🙂
CheshireCatParticipant'Roberto wrote:how do I change the color of the buttons, I'm trying to darken a bit?
Hello Roberto,
use the ColorTone property to define own colors and set CustomColor to true.
CheshireCatParticipantHello and welcome,
use the link below to dowload the office 2013 skin in three different colors (blue, green and red).
[attachment=6742:Office 2013.zip]
Quote:I am having a great difficulty to create the skin, suck at designer.It takes a little practice to unterstand the designer. I think it is very good to use 🙂
Have fun …
CheshireCatParticipantHello Pete,
maybe that's a solution for you:
Code:uses
sSkinManager, sEdit, GraphUtil;type
TsEdit = Class(sEdit.TsEdit)
procedure WndProc(var Message: TMessage); override;
end;procedure TsEdit.WndProc(var Message: TMessage);
begin
case Message.Msg of
WM_PAINT:
begin
if ReadOnly then
begin
SkinData.CustomColor := True;
Color := ColorAdjustLuma(ColorToRGB(Form1.sSkinManager1.Palette[pcEditBG]), -25, True);
end else SkinData.CustomColor := False;
end;
end;
inherited WndProc(Message);
end;Example:
[attachment=6726:sEdit.jpg]
CheshireCatParticipantHello minou,
please try this in your OnClick event:
Code:procedure TForm1.TrayIcon1Click(Sender: TObject);
begin
TrayIcon1.Visible := False;
Application.Restore;
Application.BringToFront;
Form1.Show;
end;CheshireCatParticipant'yaowz' wrote:.. then I set sEdit1.SkinData.CustomColor to TRUE, but which property to set HotTrack color?
thanks a lot.
Hello,
what color do you mean exactly? Background or border color?
CheshireCatParticipantMy first idea was to use a timer, but maybe someone has a better solution 🙂
I use the functions Hide- and ShowGlow from the acGlow unit. You can set the time interval to a value that you need.
Code:uses Windows, sCommonData, acGlow;procedure TForm2.sButton1Click(Sender: TObject);
begin
sButton1.Default := not sButton1.Default;
end;procedure TForm2.Timer1Timer(Sender: TObject);
var
skd : TsCommonData;
R, RBox : TRect;
DC : hdc;
begin
skd := sButton1.SkinData;if (sButton1.Default) then
begin
if skd.GlowID <> -1 then HideGlow(skd.GlowID);
if GetWindowRect(TWinControl(skd.FOwnerControl).Handle, R) then
begin
DC := GetWindowDC(TWinControl(skd.FOwnerControl).Handle);
if GetClipBox(DC, RBox) = 0 then Exit;
ReleaseDC(TWinControl(skd.FOwnerControl).Handle, DC);
skd.GlowID := ShowGlow(R, RBox, skd.SkinSection, 'GLOW', skd.SkinManager.gd[skd.SkinIndex].GlowMargin,
MaxByte, sButton1.Handle, skd);
end;
end else
begin
if (skd.GlowID <> -1) and not (skd.FMouseAbove) then
begin
HideGlow(skd.GlowID);
skd.GlowID := -1;
end;
end;
end;CheshireCatParticipantHello and welcome to the forum,
you can set the Default property to true for specific buttons 🙂
-
AuthorPosts