Forum Replies Created
-
AuthorPosts
-
OldGrumpyParticipant
I solved it for this particular case by just editing the skin file and changing the color values for the EDIT section. It is only a small application so it is not a problem. 🙂 A really awesome solution would be: making the skin data writable at runtime so the application can change its appearance any time 🙂 (No, not loading another skin, just manipulating some bits of it)
OldGrumpyParticipantDid you try running the app with disabled skinmanager? Same or different behaviour? When the application vanishes without a trace it is usually a stack overflow that makes Windows terminate the application without any message. Also, Updating to 7.26 could help.
December 8, 2010 at 9:38 am in reply to: Problem on create form after sSkinManager1.Active := False; #44143OldGrumpyParticipantFor a simple test, please comment out the try..finally. The try..finally might just swallow the error message.
December 7, 2010 at 10:51 am in reply to: Problem on create form after sSkinManager1.Active := False; #44125OldGrumpyParticipantFirst of all: Sorry for my ranting, but I get such obviously useless error messages all day. Why is it that people are unable to state exactly WHAT ERROR MESSAGE appears on their screen? It's even worse when YOU, who (I guess) is a developer, makes the same mistake. If your car is broken, do you just bring it in for repair without telling them what's wrong with it? I'm usually very patient with average users who have no clue about how to report a bug properly, but YOU as a developer should know how. Just for your reference: Please read http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
Thanks for your efforts though.
OldGrumpyParticipantHint: One does have a window handle, the other does not. I've had my share of headaches with the handle-less VCL controls
March 30, 2010 at 10:26 pm in reply to: 2 buggs in MDI Child code + source code solution {v6.53} #42021OldGrumpyParticipantI especially like that short-sighted comment from Mel Rees stating that “The suggestions I have seen say to write your loops in their own threads. I have not seen any credible explanation of why I have to rewrite code I have had used for 8 years now has to by completely rewritten.”
The most simple answer (and one that that guy will hopefully understand) is that you need to rewrite it threaded because we now have multi-processor computers per default and that puts threading issues to a whole new level. It doesn't exactly hit the spot but… ah well. Speaking of which, I'm just walking through a bunch of tedious legacy code where my task is to make a new version of the application. EVERYTHING seems to have been stuffed into OnClick() Events with tons of Application.ProcessMessages. *sigh*
OldGrumpyParticipantQUOTE (Support @ Jul 10 2009, 09:26 AM) <{POST_SNAPBACK}>Thank you for the info, I'll try it soon.November 26, 2009 at 9:28 am in reply to: Setting TSkinManager.SkinName when TSkinManager.Active is false #41158OldGrumpyParticipantQUOTE (Support @ Nov 26 2009, 10:19 AM) <{POST_SNAPBACK}>Hi
You must define SkinName firstly and set Active to True after it.
SkinManager will not be Active if skin is not defined…
How we can improve a behaviour?August 4, 2009 at 12:35 pm in reply to: How to determine required button width based on caption? #40161OldGrumpyParticipantYes, all borders are drawn inside the button rect. That leads me to a slightly changed question: Can I somehow determine the “client rect” of a skinned button? I mean the area that remains free for text. In some skins I have the effect that the button text reaches into the border area and that looks ugly. If I could determine the border width, I could adjust the button size accordingly to make the text fit nicely.
OldGrumpyParticipantJuly 10, 2009 at 11:07 am in reply to: How to determine required button width based on caption? #39889OldGrumpyParticipantAlphaSkins do not changes a sizes of such controls like buttons or edits. Could you show a little demo? )Some skins have thicker borders on buttons and other controls, so that buttons with only small gaps between them look like stuffed together. I'll try to make a demo to illustrate it. Furthermore, some skins (e.g. “Cold”) make the buttons look slightly trapezoidal. Basically, I am looking for a feature that tells me “this button will accept a text of x pixels width without wrap-around”. Or are these values exactly the same as for unskinned buttons? My tests with the “Cold” skin seemed to show that there are slight differences.
OldGrumpyParticipantHello
Try this demo please.
Example was created for grid but you can copy a code for receiving of the parent background.Thanks, that's just what I was looking for <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” /> Excellent! <img src="style_emoticons//a3.gif” style=”vertical-align:middle” emoid=”:a3:” border=”0″ alt=”a3.gif” /> <img src="style_emoticons//a7.gif” style=”vertical-align:middle” emoid=”:a7:” border=”0″ alt=”a7.gif” />
P.S. I played a bit with the demo exe contained in that archive, and when I click on the slider for approx. 20 times rather fast, the demo window loses focus (and still draws over the other window that just received focus). It's a bit difficult to describe but rather easy to see. Just click on the slider (not the thumb!) like mad and you should see the effect. I've seen it on two different computers so I wonder if you will see it too, and – first of all – be able to fix it <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” />
OldGrumpyParticipantHello
Could you show a several screenshots where drawing is broken?
Thanks <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” />Screenshots are probably not useful to illustrate the problem, because the slider just jumps to the right as soon as I click on the middle of the slider to move it. I'll try to build a demo app to demonstrate the behaviour.
Addendum:
I've created a demo project and attached it. Exe included too, maybe it's machine-specific… In the demo, click on the middle of the trackbar slider and see it jump a bit to the right…
[attachment=3301:Wood_Tra…_Problem.zip]
OldGrumpyParticipantQUOTE (Support @ May 25 2009, 02:41 PM) If you want to receive a color of font for any control you can use this code
if YourControl.SkinData.Skinned then begin
NormalColor := YourControl.SkinData.SkinManager.gd[YourControl.SkinData.SkinIndex].FontColor[1];
HotColor := YourControl.SkinData.SkinManager.gd[YourControl.SkinData.SkinIndex].HotFontColor[1];
endApparently, this does not work for all of “any” controls TsLabel doesn't have a SkinData property for example. Would the correct way be to set TsLabel.UseSkinColor:=False and then set TsLabel.Font.Color:=GetHighLightFontColor?
OldGrumpyParticipantOldGrumpyParticipantThank you for additional information.
Your second form (where skin is selected) must have not a skinning?
If SkinProvider is placed there then I do not see a problem…
In the your application this form haven't TsSkinProvider component too?The second form is skinned, too. It has the same skin as the main form. Do I understand this right, each form needs a TsSkinProvider placed on it? My app looks basically like this:
TMainForm (has TsSkinManager and TsSkinProvider on it)
TSettingsForm (has no Manager and no Provider)CODETSettingsForm.sCombobox1OnChange(Sender : TObject);
Begin
  TMainForm.sSkinManager1.SkinName:=sCombobox1.Items[sCombobox1.ItemIndex];
End;All Forms look skinned properly, i just noticed that something makes the sScrollbox code break as mentioned before. The breakpoint I set in line 326 is never triggered before changing the skin from the SettingsDlg, and gets triggered again and again afterwards. This makes me think that something caused that the two code branches are no longer synchronized properly. I added code to create a bitmap if it is missing, but I fear this could create a resource leak instead. I haven't had time to debug everything thoroughly. I could not reproduce this effect with code changes to the demo application, though. There has to be a very complex connection…
OldGrumpyParticipantMeanwhile I did some more research and I think there are two independent bugs. One is demonstrated in the sample project, the other one occurs in my main app only.
I am not sure how the second bug is triggered but it has definitely to do with switching skins. When I switch skins in my main app (done from a secondary dialog, not the main dialog like in the Alphaskin demo), the secondary dialog is visible but not modal. Immediately after switching the skin some repaint occurs and during that TsScrollBox.WMNCPaint() is called at a time where FCommonData.FCacheBmp is nil. This isn't checked and there is another branch in that function that explicitly sets it to nil… So I guess we're facing some kind of race condition. I set a breakpoint at that line (line 326) with the condition set to only break when FCacheBmp is nil. It doesn't break there until the skin is switched at runtime, and everytime after that again. So I guess something goes wrong during switching the skin.
OldGrumpyParticipantQUOTE (Support @ May 22 2009, 05:15 PM) Hello
For retrieving some colors from skin you can use these functions of the TsSkinManager class
function GetGlobalColor : TColor;
function GetGlobalFontColor : TColor;
function GetActiveEditColor : TColor;
function GetActiveEditFontColor : TColor;
function GetHighLightColor : TColor;
function GetHighLightFontColor : TColor;Thanks! I guess GetGlobalFontColor returns the color that is used for button captions etc., correct? Does GetGlobalColor return the color value of the dialog background? I'm just using DrawText to put text dynamically into a bitmap background, are these two the correct colors for that?
OldGrumpyParticipantYes, IIRC that was the file. If needed, I could compare my working copy to the original archive <img src="style_emoticons//smile.gif” style=”vertical-align:middle” emoid=”:)” border=”0″ alt=”smile.gif” />
OldGrumpyParticipantQUOTE (Support @ May 7 2009, 03:20 PM) <{POST_SNAPBACK}>