View Issue Details

IDProjectCategoryView StatusLast Update
0012074MMW v4Framework: Scripts/Extensionspublic2014-06-06 01:58
Reporterzvezdan Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version4.1.2 
Target Version4.1.2 
Summary0012074: Cannot hide a button on custom toolbar permanently
DescriptionSince b1378 we have a possibility to create custom toolbars using ISDBUI::AddToolbar. However, buttons placed on such toolbars cannot be hidden permanently, i.e. after setting their Visible property to False such buttons are only temporarily hidden until some action in GUI e.g. after changing node in the tree. Buttons added to the built-in toolbars like Search or Shortcuts don't have such problem. Here is the test script:

Option Explicit

Sub OnStartUp()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = "Show/hide toolbar button"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath

    Set SDB.Objects("MyToolbar") = SDB.UI.AddToolbar("Test Toolbar")
    Set SDB.Objects("tbrTest") = SDB.UI.AddMenuItem(SDB.Objects("MyToolbar"), 0, 0)
    SDB.Objects("tbrTest").Caption = "Test"
End Sub

Sub Test(oMenuItem)
    SDB.Objects("tbrTest").Visible = Not SDB.Objects("tbrTest").Visible
End Sub
Steps To ReproduceWhen you choose "Show/hide toolbar button" from the Edit menu the button on the "Test Toolbar" will be hidden.

However, if you change node in the tree, or select some another file in the filelist, or just click the arrow button of the dropdown list on the Search toolbar (assuming that it is displayed), the "Test" button will appear again on the "Test Toolbar".
TagsNo tags attached.
Fixed in build

Relationships

related to 0011496 assignedLudek Error -2147418113 - Abstract Error - when adding button to custom toolbar 

Activities

peke

2014-06-06 01:58

developer   ~0040267

Last edited: 2014-06-06 01:59

I'm confirming this can you triage?