Invisible toolbar buttons  
Author Message
Jakson





PostPosted: Thu May 13 01:40:12 CDT 2004 Top

Net Framework >> Invisible toolbar buttons

I have added a toolbar to my WinForms app. The toolbar has 3 buttons and a
separator. I have associated an imagelist with the toolbar and setup the
images and buttons appropriately.

At design-time I can see the bitmaps on the buttons, but when I run the
application the buttons are blank.

After googling around a bit I saw that some people got around this by making
sure that
this.toolBar.Buttons.AddRange (in InitializeComponent()) came at the very
bottom of the toolbar section. I made this change but it did not affect the
results.

Can anyone think of anything else that might be going wrong here?

Thanks,
Tom

DotNet36  
 
 
e>





PostPosted: Thu May 13 01:40:12 CDT 2004 Top

Net Framework >> Invisible toolbar buttons Do you call Application.EnableVisualStyles() ?
If so add:

Application.EnableVisualStyles();
--> Application.DoEvents(); <--



> I have added a toolbar to my WinForms app. The toolbar has 3 buttons and
a
> separator. I have associated an imagelist with the toolbar and setup the
> images and buttons appropriately.
>
> At design-time I can see the bitmaps on the buttons, but when I run the
> application the buttons are blank.
>
> After googling around a bit I saw that some people got around this by
making
> sure that
> this.toolBar.Buttons.AddRange (in InitializeComponent()) came at the very
> bottom of the toolbar section. I made this change but it did not affect
the
> results.
>
> Can anyone think of anything else that might be going wrong here?
>
> Thanks,
> Tom
>
>