HeDiBo

Forum Replies Created

Viewing 20 posts - 881 through 900 (of 1,174 total)
  • Author
    Posts
  • in reply to: TsMeter missing a property? #54545
    HeDiBo
    Participant

      Here is a proof of concept.

      It is a very minimal component, called TFloatProps.

      It's default value for property MaxValue is 2.68

      As you can see, it keeps this default until you overwrite the value with your own.

      [attachment=7516:FloatPropertyDemo.zip]

      in reply to: TsMeter missing a property? #54544
      HeDiBo
      Participant
        'Support' wrote:

        I have tried this way, but without success, unfortunately.

        Did you try it this way (I omitted the obvious setter method SetMyDouble):

        Code:
        interface

        const
        DefaultMyDouble: Double = 2/3;

        type
        TMyObject – class(TPersistent)
        private
        FMyDouble: Double;
        function IsMyDoubleStored: Boolean;
        public
        constructor Create(AOwner: TComponent); override;
        published
        property MyDouble: Double read FMyDouble
        write SetMyDouble
        stored IsMyDoubleStored;
        end{class};

        implementation

        constructor TMyObject.Create(AOwner: TComponent);
        begin
        inherited Create(AOwner);
        FMyDouble := DefaultMyDouble;
        end;

        function TMyObject.IsMyDoubleStored: Boolean;
        begin
        Result := FMyDouble DefaultMyDouble;
        end;

        I believe this is the simplest way to define a float property with a default value.

        in reply to: Documents glyph is missing in TPathDialog #54519
        HeDiBo
        Participant
          'Support' wrote:

          I'm not able to repeat the problem now, maybe I should change my Win 10 configuration.

          This issue exists in the AlphaControls v10.22?

          It has gotten worse in 10.22

          Previously, in my case, the documents icon didn't show. Now none of the icons shows

          in reply to: Documents glyph is missing in TPathDialog #54482
          HeDiBo
          Participant
            'carl82' wrote:

            Thanks, but i tested with earlier versions of AlphaControls (10.19 to 10.21) and they work properly in this OS. Only the newest version (10.22) is giving me this issue.

            You're right. I didn't test it again with 10.22. Now I did and the glyphs do not show. 😡

            in reply to: Documents glyph is missing in TPathDialog #54479
            HeDiBo
            Participant
              'carl82' wrote:

              Tested with pre-compiled ASkinDemo project, with the same result: icons not shown, not only Documents.

              Try this batch file: [attachment=7487:Rebuild_Icon_Cache.zip]

              Run it as administrator.

              It will clear and rebuild the Icon cache. Takes a while though and you have to restart the PC to complete the process. It worked for me (for a short while though).

              in reply to: Documents glyph is missing in TPathDialog #54475
              HeDiBo
              Participant
                'carl82' wrote:

                Same problem here, no icons in TsPathDialog. 🙁

                You say you have no icons. I had only the Documents icon missing.

                in reply to: OnChanging not fired in TsRadioGroup #54461
                HeDiBo
                Participant
                  'Support' wrote:

                  Sorry, it's my fault and I have found the reason of the problem.

                  I can send you the patched file where the OnChange property works, if you wish to try it now.

                  In 10.22 OnChange works properly. I still think that OnChanging should be called too when ItemIndex is set by code.

                  in reply to: TsSlider bugs #54460
                  HeDiBo
                  Participant

                    Despite the release notes of 10.22, that say animation of TsSlider is improved, I don't see any difference. Same problems remain.

                    Do I need (again) an uodate of the skins (there is no change compared to 10.21 if you follow the URL)?

                    in reply to: TsMeter missing a property? #54454
                    HeDiBo
                    Participant
                      'Support' wrote:

                      Delphi does not allow to set default values for float properties, this is the problem.

                      I'm agree that float value will be better in this component, but I can't set default values in this case.

                      Have a close look at the TcxProgressBar component from Developer Express. It has a property named Properties and in it you find the properties Min and Max of type Double. They can have a default value, but only in the special way implemented by Developer Express. That procedure is similar as what is described in http://tiku.io/quest…-is-it-possible

                      The essence of it is to define a float property like this:

                      Code:
                      property MyFloat: Float read GetValue write SetValue stored IsMyFloatStored;

                      with a Boolean function IsMyFloatStored that returns True if MyFloat doesn't have its default value

                      in reply to: TsMeter missing a property? #54431
                      HeDiBo
                      Participant
                        'Support' wrote:

                        If property is float, then I can't specify a default value for such property.

                        For example, I can't define the Max property to 100 as default value.

                        But you can. Just think of those values as whole numbers, but because they're really floats, you have the best of both worlds.

                        Think of the possibilities. If you have a range of 0 – 100, you can now have increments of 2.5 🙄

                        in reply to: TsMeter missing a property? #54410
                        HeDiBo
                        Participant

                          No change in 10.21

                          in reply to: OnChanging not fired in TsRadioGroup #54394
                          HeDiBo
                          Participant
                            'Support' wrote:

                            Sorry, it's my fault and I have found the reason of the problem.

                            I can send you the patched file where the OnChange property works, if you wish to try it now.

                            That's OK. I'll await the new release. I've made some code to avoid it.

                            in reply to: TsPathDialog does not show directory from Path upon execute #54393
                            HeDiBo
                            Participant
                              'Support' wrote:

                              Do you mean that TreeView is not scrolled to the predefined directory (path property) automatically?

                              That would be TsShellTreeView actually.

                              But yes, that's what I mean.

                              in reply to: TsWebLabel disabled does not show #54370
                              HeDiBo
                              Participant
                                'Support' wrote:

                                I will fix it in the nearest release.

                                Solved :a3:

                                in reply to: OnChanging not fired in TsRadioGroup #54369
                                HeDiBo
                                Participant

                                  In AC 10.21 you decided to implement both OnChange and OnChanging:

                                  • OnChange is implemented such, that a compiler warning is issued about overriding the private property FOnChange.[*]If ItemIndex is set by code, OnChange is called, but OnChanging is not called.[*]If ItemIndex is set by the user, OnChanging is called, but OnChange is not called.

                                  I'm sorry, It's a mess now :wacko:

                                  in reply to: OnChanging not fired in TsRadioGroup #54360
                                  HeDiBo
                                  Participant
                                    'Support' wrote:

                                    Standard way in this situation is using of the OnClick event.

                                    OnChanging occurs before changing of component, OnClick occurs after changing

                                    You did not react to my example. If you look carefully, you will find that OnClick will not work in case ItemIndex is set to -1.

                                    in reply to: Documents glyph is missing in TPathDialog #54358
                                    HeDiBo
                                    Participant
                                      'HeDiBo' wrote:

                                      Apparently, my Windows icon cache was corrupt. After rebuilding it, the icon for documents was back.

                                      Unfortunately, now it's gone again.

                                      The following picture shows the Documents Icon is present in the Explorer. Maybe you should retrieve the icons in a different way.

                                      [attachment=7447:ExplorerIcons.jpg]

                                      in reply to: OnChanging not fired in TsRadioGroup #54356
                                      HeDiBo
                                      Participant
                                        'Support' wrote:

                                        Maybe you mean the OnChange event? OnChange and OnChanging has different behaviours..

                                        No. I meant OnChanging. TsRadioGroup does not have an OnChange event (in TcxRadioGroup it's the other way around)..

                                        The difference between the two is very subtle. In the OnChanging event you can still cancel the change, where in OnChange the change has already been done. If you can have only one of those, I would opt for OnChanging, because it has more possibilities.

                                        Have a look at this code snippet:

                                        Code:
                                        procedure TForm.rgChanging( Sender: TObject; NewIndex: Integer; var AllowChange: Boolean );
                                        begin
                                        sButton.Enabled := NewIndex >= 0;
                                        end;

                                        So to disable sButton, I would set ItemIndex to -1 in my code. The way it is now, that's not possible without an extra procedure.

                                        In general, events that are caused by a user action, should also be fired if the same action is performed in the code. I know of hardly any exceptions to this rule.

                                        in reply to: Documents glyph is missing in TPathDialog #54346
                                        HeDiBo
                                        Participant
                                          'HeDiBo' wrote:

                                          It was back for a day, now it's gone again.

                                          Apparently, my Windows icon cache was corrupt. After rebuilding it, the icon for documents was back.

                                          in reply to: Documents glyph is missing in TPathDialog #54345
                                          HeDiBo
                                          Participant
                                            'Support' wrote:

                                            Could you show a screenshot of this dialog without skins, plz?

                                            It was back for a day, now it's gone again.

                                            This is a picture of it without skin:

                                            [attachment=7442:DocGlyphMissing 2.jpg]

                                            Weird 😮

                                            PS. I called it TPathDialog by mistake, it's TsPathDialog of course

                                          Viewing 20 posts - 881 through 900 (of 1,174 total)