- This topic has 15 replies, 2 voices, and was last updated 10 years, 11 months ago by mol.
-
AuthorPosts
-
December 18, 2013 at 9:35 pm #35963SchmidtzeParticipant
Hi,
I'm very impressed about alpha controls and I really would like to use it in my application. By now I'm using SpTBX for menus and toolbars. As I see it doesn't work with your skinning system. I'm willing to buy something, do you have recommendation for me? My limit is about 100 € I think. Is there a chance to get it working with menu and toolbar by TMS Software?
Best regards and many thanks in advance
Schmidtze
December 19, 2013 at 9:30 am #51290SchmidtzeParticipantHi,
'Schmidtze' wrote:By now I'm using SpTBX for menus and toolbars. As I see it doesn't work with your skinning system. I'm willing to buy something, do you have recommendation for me? My limit is about 100 € I think. Is there a chance to get it working with menu and toolbar by TMS Software?
I will answer my question for myself now 🙄 I thought about it again, with the result that I will continue using SpTBX together with Alpha Controls. As I'm very satisfied with SpTBX and it is skinnable itself, I will do the skinning of SpTBX in my code with all the values I get from the currently set Aplpha Skin.
Best regards
Schmidtze
December 19, 2013 at 3:59 pm #51294molParticipantHi Friedemann
Have you thought about an even simpler solution – using TActionMainMenuBar and TActionToolbar instead?
Uwe
December 19, 2013 at 4:20 pm #51295SchmidtzeParticipantHi Uwe,
long time no see…
'mol' wrote:Have you thought about an even simpler solution – using TActionMainMenuBar and TActionToolbar instead?
yes I did and honestly I'm still not really sure that I can't use a simpler solution, maybe I can. I didn't know TActionMainMenuBar and TActionToolbar by now as I used Delphi 7 in the past. Now I have a brand new licence for Delphi XE5, with wich some new components are available it seems. I have to check, for example if the TActionToolbar will show a submenu with all items which do not fit into available space (chevron button?). That's very important for me.
Best regards
Schmidtze
December 19, 2013 at 5:59 pm #51296molParticipantIf necessary, a chevron button is added automatically to an ActionToolBar as far as I know (never needed one).
December 19, 2013 at 6:03 pm #51297SchmidtzeParticipant'mol' wrote:If necessary, a chevron button is added automatically to an ActionToolBar as far as I know (never needed one).
And as I just see, these components aren't new, they are already available in Delphi 7. But I didn't ever use them…
December 19, 2013 at 7:24 pm #51298SchmidtzeParticipantHi again,
I'm filling a lot of submenus dynamically on runtime when they will be opened. That's not possible with TActionMainMenuBar or TActionToolBar I think. And SpTBX allows also to define toolbar button as dropdown menus. Then the button itself can be activated or its dropdown menu can be opened. That seems also not possible with Delphi's standard controls.
Best regards
Schmidtze
December 19, 2013 at 8:56 pm #51299molParticipant'Schmidtze' wrote:I'm filling a lot of submenus dynamically on runtime when they will be opened. That's not possible with TActionMainMenuBar or TActionToolBar I think.Think again, Friedemann… 🙂
It's definitely possible with TActionMainMenuBar, but not as easy as one might think. With the ActionToolbar you will have to use a TPopupMenu as drop down menu and fill it at runtime. There are plenty of examples out there; this was the first one that came up:
HTH
Uwe
December 19, 2013 at 9:15 pm #51300SchmidtzeParticipantHi Uwe,
'mol' wrote:Think again, Friedemann… 🙂
I did 😀 Of course you are right, it is possible to build all up on runtime. But what about the possibility to bind an action to the submenu itself, so it can be executed by clicking on the submenu item, and when clicking on the small arrow on the right, the dropdown menu will be shown (see screenshot). I'm using this for example for cycling between the different views of a file explorer when clicking on the sub menu item. The subitems contain each different view style.
Regards
Friedemann
December 19, 2013 at 9:59 pm #51301molParticipantLike this:
Code:procedure TForm1.Action1Execute(Sender: TObject);
var
p: TPoint;
begin
//Position the PopupActionBar directly underneath the button
p.x := ActionToolBar1.ActionControls[0].Left;
p.y := ActionToolBar1.Height;
p := ActionToolBar1.ClientToScreen(p);
PopupActionBar1.Popup(p.x, p.y);
end;Double-click on the TPopupActionBar, add your submenu items, assign your code to the OnClick event of each menu item – that's it.
Uwe
December 19, 2013 at 10:11 pm #51302SchmidtzeParticipantBut then clicking on the button (action) always the popup menu will be shown. That's not what I want. When clicking on the button, the action should be executed, I don't want to see the popup (submenu) then. Only using the little arrow on the right would open the submenu.
Regards
Friedemann
December 19, 2013 at 10:51 pm #51303molParticipantHi Friedemann
I don't think that is possible with regular actions. What you can do though is to create your own container action, place it on the ActionToolbar, and drag/drop a TListview or TComboBox into the container action. Rather complicated, so why don't you let the user simply select from the popup menu?
Uwe
December 20, 2013 at 11:02 am #51289SchmidtzeParticipantHi Uwe,
'mol' wrote:Rather complicated, so why don't you let the user simply select from the popup menu?
not complicated with SpTBXLib 😉 Of course the user can also select something from the popup menu. But already the parent menu item contains functionalety which improves the usability a lot, I think. Attached you see 3 screenshots
1. On the first you see the 2 possible view modes of the file browser. The popup menu do not has to be opened, a simple click on the toolbar button (not its arrow on the right) will toggle between these 2 view modes (report, thumbnail). If there were more than 2 options, the button would cycle between them. I think the Windows Explorer has got same functionalety.
2. On the second you see the image viewer with a button “Fit” in the toolbar. This button always uses the fit option which is enabled in its submenu
3. The 3rd screenshot shows the zoom menu. The button in the toolbar will zoom the image always to 100%, but in its submenu a lot of other zoom values can be selected.
So I like these optional possibilities of SpTBXLib and don't want to miss them.
Regards
Friedemann
December 20, 2013 at 3:45 pm #51267molParticipantHi Friedemann
I understand, but what you want is possible with ActnCtrls. Screenshot 1 and 2 show standard behavior of an ActionToolbar, the third screenshot can be done by using an action container as described above. Only the latter will require some work. Of course, you can take the easy way out by using SpTBXLib, but why do you want to rely on yet another component set which works with its own styles/skinning? When I develop applications, I always try to reuse as much code as possible and only fall back to other components if I really have to.
Regards
Uwe
December 20, 2013 at 4:43 pm #51306SchmidtzeParticipantHi Uwe,
'mol' wrote:When I develop applications, I always try to reuse as much code as possible and only fall back to other components if I really have to.
of course that's the same way I normally try to do it. Maybe a misunderstanding, I'm using SpTBXLib already and don't want to change if, if not necessary. I would have changed if there is a menu/toolbar system which offers all what I need AND is skinnable by Alpha Controls. So I will try to stay on SpTBXLib and try out using its own skinning properties by using the properties of Alpha Skins.
Regards
Friedemann
December 20, 2013 at 5:20 pm #51307molParticipantOh sorry, I thought you wanted to replace your current components with AlphaControls. If you want to keep SpTBXLib, then you'll just have to find two skins that go together colorwise, and hope for the best that both skinning systems do not interfere with each other at runtime.
Uwe
-
AuthorPosts
- You must be logged in to reply to this topic.