Opened 18 years ago
Closed 13 years ago
#939 closed New Feature (duplicate)
add toolbar buttons at runtime
| Reported by: | Paul Moers | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | UI : Toolbar | Version: | |
| Keywords: | Cc: |
Description
In the line of thought my request 'create toolbar(set) at runtime' (Ticket #937), it would be great to be able to add existing buttons at runtime.
Change History (5)
comment:1 Changed 18 years ago by
| Keywords: | dynamic add toolbar button runtime removed |
|---|
comment:2 Changed 18 years ago by
| Type: | Bug → New Feature |
|---|
comment:3 Changed 17 years ago by
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:4 Changed 17 years ago by
| Keywords: | Confirmed added |
|---|---|
| Resolution: | duplicate |
| Status: | closed → reopened |
I changed my opinion. Right now it is hard to hide button added to ToolbarSets in fckconfig.js
tbButton = new FCKToolbarButton( 'myButton', 'myButton', 'My button', FCK_TOOLBARITEM_ICONTEXT ) ) ;
tbButton.IconPath = icon;
FCKToolbarItems.RegisterItem( 'myButton', tbButton ) ;
if ( !IWantThisButton ) { //hack to hide myButton
tbButton.Create = function() {return 0;}
tbButton.Disable = function() {return 0;}
tbButton.RefreshState = function() {return 0;}
}
it should look like...
if ( IWantThisButton ) {
tbButton = new FCKToolbarButton( 'myButton', 'myButton', 'My button', FCK_TOOLBARITEM_ICONTEXT ) ) ;
}else{
tbButton = new FCKToolbarButton( 'myButton', 'myButton', 'My button', FCK_TOOLBARITEM_ICONTEXT | FCK_HIDDEN ) ) ;
}
and/or...
tbButton.setState('myButton', FCK_VISIBLE);
tbButton.setState('myButton', FCK_HIDDEN);
comment:5 Changed 13 years ago by
| Keywords: | Confirmed removed |
|---|---|
| Resolution: | → duplicate |
| Status: | reopened → closed |
FCKeditor is no longer supported and this issue has already been reported for CKEditor.
Closing this one as DUP of #7280

DUP of #938