Share your advanced knowledge/code with the community.
User avatar
Peter
 
Posts: 561
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

ToolBarStandardButton() with dijitIcons

by Peter Tue Feb 14, 2017 10:15 pm

Hello,

at last: ToolBarStandardButton() also for SpiderBasic. ;-)

Image

Code: Select all
; dijitIcons

#dijitIconApplication   = "dijitIconApplication"
#dijitIconBookmark      = "dijitIconBookmark"
#dijitIconChart         = "dijitIconChart"
#dijitIconClear         = "dijitIconClear"
#dijitIconConfigure     = "dijitIconConfigure"
#dijitIconConnector     = "dijitIconConnector"
#dijitIconCopy          = "dijitIconCopy"
#dijitIconCut           = "dijitIconCut"
#dijitIconDatabase      = "dijitIconDatabase"
#dijitIconDelete        = "dijitIconDelete"
#dijitIconDocuments     = "dijitIconDocuments"
#dijitIconEdit          = "#dijitIconEdit"
#dijitIconEditProperty  = "dijitIconEditProperty"
#dijitIconEditTask      = "dijitIconEditTask"
#dijitIconError         = "dijitIconError"
#dijitIconFile          = "dijitIconFile"
#dijitIconFilter        = "dijitIconFilter"
#dijitIconFolderClosed  = "dijitIconFolderClosed"
#dijitIconFolderOpen    = "dijitIconFolderOpen"
#dijitIconFunction      = "dijitIconFunction"
#dijitIconKey           = "dijitIconKey"
#dijitIconLoading       = "dijitIconLoading"
#dijitIconMail          = "dijitIconMail"
#dijitIconNewTask       = "dijitIconNewTask"
#dijitIconPackage       = "dijitIconPackage"
#dijitIconPrint         = "dijitIconPrint"
#dijitIconSample        = "dijitIconSample"
#dijitIconSave          = "dijitIconSave"
#dijitIconSearch        = "dijitIconSearch"
#dijitIconTable         = "dijitIconTable"
#dijitIconTask          = "dijitIconTask"
#dijitIconUndo          = "dijitIconUndo"
#dijitIconUsers         = "dijitIconUsers"
#dijitIconLeaf          = "dijitLeaf"

; dijitEditorIcons

#dijitEditorIconBackColor            = "dijitEditorIcon dijitEditorIconBackColor"
#dijitEditorIconBold                 = "dijitEditorIcon dijitEditorIconBold"
#dijitEditorIconCancel               = "dijitEditorIcon dijitEditorIconCancel"
#dijitEditorIconCopy                 = "dijitEditorIcon dijitEditorIconCopy"
#dijitEditorIconCreateLink           = "dijitEditorIcon dijitEditorIconCreateLink"
#dijitEditorIconCut                  = "dijitEditorIcon dijitEditorIconCut"
#dijitEditorIconDelete               = "dijitEditorIcon dijitEditorIconDelete"
#dijitEditorIconForeColor            = "dijitEditorIcon dijitEditorIconForeColor"
#dijitEditorIconFullScreen           = "dijitEditorIcon dijitEditorIconFullScreen"
#dijitEditorIconHiliteColor          = "dijitEditorIcon dijitEditorIconHiliteColor"
#dijitEditorIconIndent               = "dijitEditorIcon dijitEditorIconIndent"
#dijitEditorIconInsertHorizontalRule = "dijitEditorIcon dijitEditorIconInsertHorizontalRule"
#dijitEditorIconInsertImage          = "dijitEditorIcon dijitEditorIconInsertImage"
#dijitEditorIconInsertOrderedList    = "dijitEditorIcon dijitEditorIconInsertOrderedList"
#dijitEditorIconInsertTable          = "dijitEditorIcon dijitEditorIconInsertTable"
#dijitEditorIconInsertUnorderedList  = "dijitEditorIcon dijitEditorIconInsertUnorderedList"
#dijitEditorIconItalic               = "dijitEditorIcon dijitEditorIconItalic"
#dijitEditorIconJustifyCenter        = "dijitEditorIcon dijitEditorIconJustifyCenter"
#dijitEditorIconJustifyFull          = "dijitEditorIcon dijitEditorIconJustifyFull"
#dijitEditorIconJustifyLeft          = "dijitEditorIcon dijitEditorIconJustifyLeft"
#dijitEditorIconJustifyRight         = "dijitEditorIcon dijitEditorIconJustifyRight"
#dijitEditorIconLeftToRight          = "dijitEditorIcon dijitEditorIconLeftToRight"
#dijitEditorIconListBulletIndent     = "dijitEditorIcon dijitEditorIconListBulletIndent"
#dijitEditorIconListBulletOutdent    = "dijitEditorIcon dijitEditorIconListBulletOutdent"
#dijitEditorIconListNumIndent        = "dijitEditorIcon dijitEditorIconListNumIndent"
#dijitEditorIconListNumOutdent       = "dijitEditorIcon dijitEditorIconListNumOutdent"
#dijitEditorIconNewPage              = "dijitEditorIcon dijitEditorIconNewPage"
#dijitEditorIconOutdent              = "dijitEditorIcon dijitEditorIconOutdent"
#dijitEditorIconPaste                = "dijitEditorIcon dijitEditorIconPaste"
#dijitEditorIconPrint                = "dijitEditorIcon dijitEditorIconPrint"
#dijitEditorIconRedo                 = "dijitEditorIcon dijitEditorIconRedo"
#dijitEditorIconRemoveFormat         = "dijitEditorIcon dijitEditorIconRemoveFormat"
#dijitEditorIconRightToLeft          = "dijitEditorIcon dijitEditorIconRightToLeft"
#dijitEditorIconSave                 = "dijitEditorIcon dijitEditorIconSave"
#dijitEditorIconSelectAll            = "dijitEditorIcon dijitEditorIconSelectAll"
#dijitEditorIconSep                  = "dijitEditorIcon dijitEditorIconSep"
#dijitEditorIconSpace                = "dijitEditorIcon dijitEditorIconSpace"
#dijitEditorIconStrikethrough        = "dijitEditorIcon dijitEditorIconStrikethrough"
#dijitEditorIconSubscript            = "dijitEditorIcon dijitEditorIconSubscript"
#dijitEditorIconSuperscript          = "dijitEditorIcon dijitEditorIconSuperscript"
#dijitEditorIconTabIndent            = "dijitEditorIcon dijitEditorIconTabIndent"
#dijitEditorIconUnderline            = "dijitEditorIcon dijitEditorIconUnderline"
#dijitEditorIconUndo                 = "dijitEditorIcon dijitEditorIconUndo"
#dijitEditorIconUnlink               = "dijitEditorIcon dijitEditorIconUnlink"
#dijitEditorIconViewSource           = "dijitEditorIcon dijitEditorIconViewSource"
#dijitEditorIconWikiword             = "dijitEditorIcon dijitEditorIconWikiword"

Procedure ToolBarStandardButton(Button, ButtonIcon.s, Mode = #PB_ToolBar_Normal, Text.s = "")
 
  ToolBarImageButton(Button, 0, Mode)
  ! var b = spider.toolbar.current.buttons[v_button];
  ! var i = $(b.domNode).find(".dijitIcon");
  ! i.addClass(v_buttonicon);
 
  If Text <> ""
    ! var s = $(b.domNode).find(".dijitButtonText");
    ! s.removeClass("dijitDisplayNone");
    ! s.text(v_text);
  EndIf
 
EndProcedure


OpenWindow(0, 0, 0, 295, 260, "ToolBarStandardButton example", #PB_Window_TitleBar | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)

CreateToolBar(0, WindowID(0))

ToolBarStandardButton(0, #dijitEditorIconNewPage)
ToolBarStandardButton(1, #dijitIconFolderOpen)
ToolBarStandardButton(2, #dijitIconSave)

ToolBarSeparator()

ToolBarStandardButton(3, #dijitEditorIconCut)
ToolBarStandardButton(4, #dijitEditorIconCopy)
ToolBarStandardButton(5, #dijitEditorIconPaste)


Greetings ... Peter
Return to Tricks 'n' Tips

Who is online

Users browsing this forum: No registered users and 1 guest