Forum Replies Created
-
AuthorPosts
-
standayParticipant'Support' wrote:
Current skin must be loaded (sSkinManager1.Active property should be True and SkinName is sSkinManager1.correct).
If skin is not loaded yet, then array of sections is empty and all SkinIndexes will be -1.
OK, is there any event that fires or a property I can check that tells when the skin is loaded for sure? Something like an OnSkinLoaded event? I know there isn't one but is there anything that acts like that? Or should I just repeat the GetSkinIndex call until it is >= 0?
Thanks!
standayParticipantI'd like to see a demo on doing this the right way(!) when possible. The way I'm doing it right now is to clear the commonsections on the fly, and then add everything back in only with the new color I want in a given section. But then I have to reinit everything using sSkinManager1.SkinName := sSkinManager1.SkinName. This all works, but it's slow and the code involved is messy. I'm going to try the approach jonesa put together and see if that works better.
January 11, 2016 at 4:44 pm in reply to: Is there a way to pull colors and other settings from skin sections at run time? #54577standayParticipantThanks, that's very helpful!
standayParticipantSurprisingly the Pmemo skined OK like the Tmemo and TRichedit do. I could scroll the Pmemo by mousewheel or keys while over/in the text, but when using the scrollbars (both horz and vert), the text would move correctly but as soon as I let up on the mouse it would scroll back to wherever the cursor was. So my guess was it was doing a scrollinview on mouseup which turned out to be right.
I hate to hack source code so what I did to workaround that was to subclass (I think that's the right term) the Pmemo in my app, and then did this in the MouseUp:
procedure TPlusMemo.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
oldDisplayOnly: boolean;
begin
if not Form1.sSkinManager1.Active then //no need for a hack if skinning is inactive
begin
inherited;
exit;
end;
//hack:
oldDisplayOnly := DisplayOnly;
DisplayOnly := Button mbRight;
inherited;
DisplayOnly := oldDisplayOnly;
end;
I know, pretty ugly hack but it does work and has not seemed to cause any side effects so far and I've been doing a ton of work on my new app with this in it. If I was going to run into something I probably would have by now. Here's a screenshot of the app with the plusmemo internal (yet skinned and working) scrollbars):
[attachment=7534:skinned.png]
standayParticipant'Kujo' wrote:Ok, but I think is not possible to use a dialog like this:
[attachment=7339:FontDialog.png]
Regards
I had this same issue. Here's how I fixed it .Wound up the key was just setting the ChangeSysColors to false before showing the dialog, and to sSkinManager1.Active afterwards. sSkinManager1.Active will be true when skins are on. Looks simple now, but took hours to figure out.
sSkinManager1.Options.ChangeSysColors := false;
fontDlgOK := FontDialog1.Execute;
if fontDlgOK then…
//when done:
sSkinManager1.Options.ChangeSysColors := sSkinManager1.Active;
December 15, 2015 at 9:02 pm in reply to: Is there a way to pull colors and other settings from skin sections at run time? #54489standayParticipant'standay' wrote:Is there a way to pull colors and other settings from skin sections at run time? For example I'd like to “pull” the color setting for the titlebar from the active skin.
Finally solved this to some degree. I found the enumeration for TacPaletteColors and use this to access what I need: sSkinManager1.Palette[pcSelectionBG]
standayParticipant'Support' wrote:I see in your skin, the “FORM” skin section has two states defined and colors of form are different for these states.
Try to change color of FORM, make this color equal for both states. Maybe it's a reason.
Write here if this solution don't work, I will need a demo in this case.
Still does the same thing. It's not a big deal, just something I noticed. If you still want a demo let me know what is needed. I can zip up the project if that will help.
standayParticipant'Support' wrote:Hello! Can you send this skin to support@alphaskins.com ? I will check it.
Thanks, I sent to to you.
-
AuthorPosts