OldGrumpy

Forum Replies Created

Viewing 20 posts - 1 through 20 (of 24 total)
  • Author
    Posts
  • in reply to: Custom Font Color for Third Party Controls #46508
    OldGrumpy
    Participant

      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)

      in reply to: Crash in CreateForm #44238
      OldGrumpy
      Participant

        Did 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.

        in reply to: Problem on create form after sSkinManager1.Active := False; #44143
        OldGrumpy
        Participant

          For a simple test, please comment out the try..finally. The try..finally might just swallow the error message.

          in reply to: Problem on create form after sSkinManager1.Active := False; #44125
          OldGrumpy
          Participant

            First 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.

            in reply to: Serious bug in TsBevel (version 6.68) #42978
            OldGrumpy
            Participant

              Hint: One does have a window handle, the other does not. I've had my share of headaches with the handle-less VCL controls

              in reply to: 2 buggs in MDI Child code + source code solution {v6.53} #42021
              OldGrumpy
              Participant

                I 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*

                in reply to: Use new Vista common dialogs with Alphaskins? #41882
                OldGrumpy
                Participant

                  QUOTE (Support @ Jul 10 2009, 09:26 AM) <{POST_SNAPBACK}>
                  Thank you for the info, I'll try it soon.
                  OldGrumpy
                  Participant

                    QUOTE (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?
                    in reply to: How to determine required button width based on caption? #40161
                    OldGrumpy
                    Participant

                      Yes, 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.

                      in reply to: Combobox Bug still in 6.40 stable :( #39936
                      OldGrumpy
                      Participant

                        QUOTE (Support @ Jul 14 2009, 06:45 AM)
                        Sorry for trouble, try this file please.

                        Thanks for the quick fix, it's working again. <img src="style_emoticons//a7.gif” style=”vertical-align:middle” emoid=”:a7:” border=”0″ alt=”a7.gif” />

                        in reply to: How to determine required button width based on caption? #39889
                        OldGrumpy
                        Participant

                          QUOTE (Support @ Jul 10 2009, 10:30 AM)
                          AlphaSkins 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.

                          in reply to: TPaintbox transparency #39552
                          OldGrumpy
                          Participant

                            QUOTE (Support @ Jun 10 2009, 07:28 PM)
                            Hello
                            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” />

                            in reply to: TsTrackbar slider and certain skins == strange effect #39415
                            OldGrumpy
                            Participant

                              QUOTE (Support @ Jun 1 2009, 08:38 AM)
                              Hello
                              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]

                              in reply to: How to retrieve color values from active skin? #39382
                              OldGrumpy
                              Participant

                                QUOTE (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];

                                end

                                Apparently, this does not work for all of “any” controls wink.gif 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?

                                in reply to: Access Violation on FormClose #39381
                                OldGrumpy
                                Participant

                                  QUOTE (bjoerng85 @ May 27 2009, 03:46 PM)
                                  I have now solved this problem.

                                  How did you solve it? It could be useful for others, too.

                                  in reply to: AC6.23: Bug when changing skin from secondary from #39339
                                  OldGrumpy
                                  Participant

                                    QUOTE (Support @ May 25 2009, 02:32 PM)
                                    Thank 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)

                                    CODE
                                    TSettingsForm.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…

                                    in reply to: AC6.23: Bug when changing skin from secondary from #39325
                                    OldGrumpy
                                    Participant

                                      Meanwhile 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.

                                      in reply to: How to retrieve color values from active skin? #39322
                                      OldGrumpy
                                      Participant

                                        QUOTE (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?

                                        in reply to: AC 6.22 full D2006 compile errors #39150
                                        OldGrumpy
                                        Participant

                                          Yes, 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” />

                                          in reply to: AC 6.22 Demo: Stack overflow on app start #39113
                                          OldGrumpy
                                          Participant

                                            QUOTE (Support @ May 7 2009, 03:20 PM) <{POST_SNAPBACK}>
                                            Thank you
                                            Author
                                            Posts
                                          Viewing 20 posts - 1 through 20 (of 24 total)