Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Various request about Component Pack

 Post Reply Post Reply
Author
Finelli Fabio View Drop Down
Member
Member
Avatar

Joined: 01 Jul 2010
Posts: 51
Post Options Post Options   Quote Finelli Fabio Quote  Post ReplyReply Direct Link To This Post Topic: Various request about Component Pack
    Posted: 23 Sep 2010 at 12:01pm
TAdvSmoothSpeedButton
The Component Pack lacks for that kind of buttons, which i'll need so much.
Or a way to emulate the "AllowAllUp" and "GroupIndex" properties behaviour using TAdvSmoothToggleButtons.

Caption->Text
I am forced to rewrite a lot of code because, using the "smooth" component, the Caption property is no more an AnsiString but instead it is an object.
There's any way to make that writing something like
aSmoothLabel->Caption = "A string";
or
aSmoothLabel->Caption = an_AnsiString;
will work?

TAdvSmoothButton
They lacks some of the "visual properties" there's in TAdvSmoothToggleButton (BevelColorDisabled, BevelColorDown, ColorDisabled,ColorDown).
This make a bit hard to put the two kind of buttons one at the side of the other, because visually they becomes different.
Could be possible to implement the same properties of the SmoothToggleButton in the SmoothButton?


Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7903
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 24 Sep 2010 at 4:44am
1. Thanks for this feedback. We'll consider this for a future update
2. Caption is complex property that holds much more than just the text. We can't change this to a string property
3. If you set AdvSmoothToggleButton.AutoToggle = false, you can use it as a regular button
Back to Top
Finelli Fabio View Drop Down
Member
Member
Avatar

Joined: 01 Jul 2010
Posts: 51
Post Options Post Options   Quote Finelli Fabio Quote  Post ReplyReply Direct Link To This Post Posted: 24 Sep 2010 at 8:20am
Originally posted by Bruno Fierens

2. Caption is complex property that holds much more than just the text. We can't change this to a string property

I know this. But, you may overload the "=" operator of the caption class, when the type passed is an AnsiString or a char*, to let it just writes the string passed in the Text property.

As a personal opinion, i think that naming that whole class "Caption" breaks the BDS standards. I'd liked more to have a standard Caption property and something like "CaptionAppearance" for the whole class property.
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7903
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 24 Sep 2010 at 8:24am
We can't change this now as it would break backwards compatibility. Caption includes here all properties of the caption.
Back to Top
Finelli Fabio View Drop Down
Member
Member
Avatar

Joined: 01 Jul 2010
Posts: 51
Post Options Post Options   Quote Finelli Fabio Quote  Post ReplyReply Direct Link To This Post Posted: 24 Sep 2010 at 9:34am
If you meant that it is impossible to rename the property, then i (sadly) agree,
But adding the overloaded "=" operator should not affect backward compatibility, because right now assigning an ansistring to the Caption property was not possible, so no one is doing it.
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7903
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 24 Sep 2010 at 10:04am
I doubt that is possible on a published property. It could affect the DFM streaming. I will investigate this though.
Back to Top
Finelli Fabio View Drop Down
Member
Member
Avatar

Joined: 01 Jul 2010
Posts: 51
Post Options Post Options   Quote Finelli Fabio Quote  Post ReplyReply Direct Link To This Post Posted: 01 Oct 2010 at 5:59am
I'm working on a TAdvSmoothListBox.
To get a pointer to an item having the index it is necessary to use some really weird code:
TAdvSmoothListBoxItem* pItem = TAdvSmoothListBox1->Items->operator [](itemindex);
or
TAdvSmoothListBoxItem* pItem = TAdvSmoothListBox1->Items->Items[itemindex];

It could be much better if the [] operator could be reworked to have the following line working:
TAdvSmoothListBoxItem* pItem = TAdvSmoothListBox1->Items[itemindex];
Or at least a new property or method, to write something like:
TAdvSmoothListBoxItem* pItem = TAdvSmoothListBox1->GetItem(itemindex);
TAdvSmoothListBoxItem* pItem = TAdvSmoothListBox1->Item[itemindex];


Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7903
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 01 Oct 2010 at 9:42am
This is actually something very typical for Delphi default array properties. You'll see the same in any component, including standard VCL components that have default array properties. It is a Delphi language feature that C++ does not have.
Back to Top
Finelli Fabio View Drop Down
Member
Member
Avatar

Joined: 01 Jul 2010
Posts: 51
Post Options Post Options   Quote Finelli Fabio Quote  Post ReplyReply Direct Link To This Post Posted: 01 Oct 2010 at 10:24am
Not really. No one of the standard VCL components requires ....->Items->Items[]. Usually the first "Items" returns a pointer to a single item, not to the collection, so a single ...->Items[] is working.
But i see now why it is in that way:
imho, it was a bad choice having called "Items" the published property that returns the  TAdvSmoothListBoxItems* in the TAdvSmoothListBox class. As for the the "Caption" property in most of the smooth components, using a "Standardized" BDS name for somewhat different is confusing for the end user (one of them is me).
All my code is full of ALabel->Caption = "AString" but not in the form containing you components.
The same happens with the Items propertiy: from now to the future, any new programmer that will handle my code will have to understand why i've used Somewhat->Items[x] everywhere but Somewhat->Items->Items[x] for your components.

For this reason pls consider adding a method like "GetItem(itemindex). It cost not so much troubles and will make c++ code less confusing.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down