Image on Toolbar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everybody

when I disable my toolbar image the whole image turns black. It doe
not "grey out". Is there something wrong with my image or should I ad
another image that is "grey out" and set that image to the toolbar whe
it is disabled

thanks
adam
 
there is a bug in the current release which kills the transparency of the images on the toolbar. that may be the reason why your image turns completely black. the workaround is to create your transparent toolbar images and add them to the imagelist in the form load event and also assign them to the toolbar buttons in the form load event. this will make the images grey when the buttons are disabled. remember not to add the images to your imagelist in the design mode.

----- adam wrote: ----

Hello everybody

when I disable my toolbar image the whole image turns black. It doe
not "grey out". Is there something wrong with my image or should I ad
another image that is "grey out" and set that image to the toolbar whe
it is disabled

thanks
adam
 
i tried this and it did not work:

Private Sub AccountForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ImageList1 = New System.Windows.Forms.ImageList
Me.ToolBar1 = New System.Windows.Forms.ToolBar
Me.ToolBarSave = New System.Windows.Forms.ToolBarButton

Me.ImageList1.Images.Add(New Bitmap([Assembly].GetExecutingAssembly().GetManifestResourceStream("Account.SAVE.BMP")))
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)

ToolBar1.ImageList = ImageList1

ToolBarSave.Enabled = False
ToolBarSave.ImageIndex = 0

Me.ToolBar1.Buttons.Add(Me.ToolBarSave)
Me.Controls.Add(ToolBar1)

End Sub


----- sreekanth wrote: -----

there is a bug in the current release which kills the transparency of the images on the toolbar. that may be the reason why your image turns completely black. the workaround is to create your transparent toolbar images and add them to the imagelist in the form load event and also assign them to the toolbar buttons in the form load event. this will make the images grey when the buttons are disabled. remember not to add the images to your imagelist in the design mode.

----- adam wrote: -----

Hello everybody,

when I disable my toolbar image the whole image turns black. It does
not "grey out". Is there something wrong with my image or should I add
another image that is "grey out" and set that image to the toolbar when
it is disabled?

thanks.
adam
 
thanks for the advice Sergiy ... however, I don't see an attachment/example to this repl

----- \"Serg Kuryata [MS]\" wrote: ----

Hello Adam

I don't think that there is anything wrong with your image. This is the way
how the native toolbar control handles the images. I would recommend you to
use icons instead of bitmaps. In this case, the buttons will be greyed out
correctly. I attached a simple sample that illustrates how to do it

Hope this helps
Best regards
Sergiy

This posting is provided "AS IS" with no warranties, and confers no rights

-------------------
| Thread-Topic: Image on Toolba
| thread-index: AcPgXBi+hCMSrrTmT7+C6fowI+Mghw=
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframewor
| From: "=?Utf-8?B?YWRhbQ==?=" <[email protected]
| Subject: Image on Toolba
| Date: Wed, 21 Jan 2004 12:21:05 -080
| Lines:
| Message-ID: <[email protected]
| MIME-Version: 1.
| Content-Type: text/plain
| charset="Utf-8
| Content-Transfer-Encoding: 7bi
| X-Newsreader: Microsoft CDO for Windows 200
| Content-Class: urn:content-classes:messag
| Importance: norma
| Priority: norma
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.
| Newsgroups: microsoft.public.dotnet.framework.compactframewor
| Path: cpmsftngxa07.phx.gb
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:4365
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.18
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframewor
|
| Hello everybody

when I disable my toolbar image the whole image turns black. It doe
not "grey out". Is there something wrong with my image or should I ad
another image that is "grey out" and set that image to the toolbar whe
it is disabled

thanks
 
Hmm... It's strange that you can't see the attachment. It is there. I
wonder what client you are using to read the newsgroup.

Thank you,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: Image on Toolbar
| thread-index: AcPhxp6zJzs88jikSAOlIUcbs0FKGQ==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Image on Toolbar
| Date: Fri, 23 Jan 2004 07:36:07 -0800
| Lines: 50
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:43860
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| thanks for the advice Sergiy ... however, I don't see an
attachment/example to this reply

----- \"Serg Kuryata [MS]\" wrote: -----

Hello Adam,

I don't think that there is anything wrong with your image. This is
the way
how the native toolbar control handles the images. I would recommend
you to
use icons instead of bitmaps. In this case, the buttons will be greyed
out
correctly. I attached a simple sample that illustrates how to do it.

Hope this helps.
Best regards,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
| Thread-Topic: Image on Toolbar
| thread-index: AcPgXBi+hCMSrrTmT7+C6fowI+Mghw==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: "=?Utf-8?B?YWRhbQ==?=" <[email protected]>
| Subject: Image on Toolbar
| Date: Wed, 21 Jan 2004 12:21:05 -0800
| Lines: 9
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:43658
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hello everybody,

when I disable my toolbar image the whole image turns black. It does
not "grey out". Is there something wrong with my image or should I add
another image that is "grey out" and set that image to the toolbar when
it is disabled?

thanks
|
 
Back
Top