You are not logged in.
Pages: 1
hi,
can i use TSQLCustomToolBar with something else of TCustomForm, TSynPager and TSynPage?
i see the code and if i pass something else i falling in assert(false).
i would like to use TSQLCustomToolBar to create a toolbar from enum in a specific TAdvOfficePage that i have.
its possible?
thanks,
Emanuele.
Offline
You can use TMS components with the units.
Just define the USETMSPACK compilation conditional in the project properties.
See http://synopse.info/forum/viewtopic.php?id=280 for screenshot with either VCL either TMS components ribbon.
Offline
ooooooohhhhh
sorry...it's friday...!!
Offline
hi ab,
excuse me but i try this code with USETMSPACK defined
tb: TSQLCustomToolBar;
tb.Init(self, TypeInfo(TmieAction),prova,nil,''); //self is TForm
and create the toolbar in my form, but if i would like to create the toolbar in an advofficepager that is in the form how can i do?
if try this
tb: TSQLCustomToolBar;
tb.Init(AdvOfficePager1, TypeInfo(TmieAction),prova,nil,''); //AdvOfficePager1 is TAdvOfficePager
i have assert false because TAdvOfficePager isnt a tsynpager.
thanks,
Emanuele.
Offline
If you define USETMSPACK, in fact TSynPager is an alias to TAdvToolBarPager.
IMHO a possibility is to define the TSynPager from code, via AdvOfficePager1 := TAdvToolBarPager.Create(....).
But you can note that:
type
TSynToolButton = TAdvGlowButton;
TSynPopupMenu = TAdvPopupMenu;
TSynBodyPage = TAdvOfficePage;
TSynBodyPager = TAdvOfficePager;
So you can just use your AdvOfficePager1 instance for this constructor:
TSQLRibbonTab.Create(AdvOfficePager1 ,....)
Offline
hi ab,
maybe there is something that i dont understand because dont work.
can u show me an example with a toolbar created from enum in a tms component that i put manually in the form?
Offline
You have to create a TSynPager from code, assign it to your AdvOfficePager1 as parent, then use TSQLCustomToolBar.Init() on this TSynPager.
You'll need the additional methods defined in TSynPager to work with TSQLCustomToolBar. A plain TAdvToolBarPager is not enough.
Offline
Pages: 1