Change the back color of StatusBar control c#
-
hi to all, does anyone knows how can change the backcolor of a statusbar control with c# winforms application best regards and thanks in advance fady
-
hi to all, does anyone knows how can change the backcolor of a statusbar control with c# winforms application best regards and thanks in advance fady
-
You have to overwrite the paint event and then draw the color onto the graphics object on your own. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
Thanks to your reply Ingo, how can i fire the paint event ? the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar ! best regards and thanks in advance fady
-
Thanks to your reply Ingo, how can i fire the paint event ? the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar ! best regards and thanks in advance fady
fady_sayegh wrote:
the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar !
Damn, your right. Well this is a problem. I would derive a new control, but thats a little bit tricky. You have to decide from which class (component, control) and than you must do many things on your own. You could use the handle to call unmanaged api-functions to do the redraw, but I don't know any C# Code. Sorry, my fault. Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
-
fady_sayegh wrote:
the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar !
Damn, your right. Well this is a problem. I would derive a new control, but thats a little bit tricky. You have to decide from which class (component, control) and than you must do many things on your own. You could use the handle to call unmanaged api-functions to do the redraw, but I don't know any C# Code. Sorry, my fault. Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
Thanks any way Ingo