It's a bug, but where ?

A frsh bug dating from 30 minutes ago:

in a ToolBar, the code below have troubles (watch lines with [*]):

[code] ButtonDelete = New ToolButton

ButtonDelete.Caption = “Delete”
ButtonDelete.Name = “Delete”
ButtonDelete.Icon = Button_Delete // [*]

// Set the Style
ButtonDelete.Style = ToolButton.ToolStylePushButton // [*]

// Add it to the Toolbar
Me.Append ButtonDelete[/code]

[*] This item does not exists
in lines 98 and 101 (if that matters).

I changed ButtonClear to ButtonDelete.

I tool the code from a different button, changed (I typed the text) the button names / Caption / Name: still bugs.

ButtonDelete have been declared as ToolButton Property (else I will get the error for the other lines.

Button_Delete is a valid icon (I deleted the Button_Clear reference, renamed the icon on disk and re-import it. It is correctly imported to the project.

I even tried to move that code at the top of the Code Editor window: no change.

Help !

Since there are errors for Icon and Style only, I’d say that ButtonDelete is not defined As ToolButton but as ToolItem, it’s superclass.


Thank you Eli, you find it !

I got the real ToolBar:

I only have to add the code to Print to PDF and maybe modify the ToolBar look.