Dans wxPython, il existe certaines fonctions qui créent des boutons tels que wx.lib.buttons.GenBitmapTextButton et d'autres fonctions comme ça. Je me demande si je peux créer un bouton avec une image de fond de fantaisie, ainsi que du texte d'étiquette.wxPython Button Background Image
0
A
Répondre
0
Il n'y a pas de bouton intégré qui autorise une image d'arrière-plan sous le texte. Vous pouvez probablement regarder l'un des widgets de boutons génériques et les utiliser comme un modèle. Fondamentalement, vous avez juste besoin de dessiner le bitmap sur, puis dessiner du texte sur le dessus, probablement en utilisant wx.DC ou wx.GCDC ou similaire. Les boutons génériques incluent des éléments tels que wx.lib.buttons, wx.lib.agw.aquabutton et wx.lib.platebtn, entre autres.
Questions connexes
- 1. wxPython Enter Button événement
- 2. WPF Button Mouseover Image
- 3. WPF Button No Border No Background
- 4. Image-Button
- 5. iPhone - UIButton - background image handicapés
- 6. Float background-image verticale sous un autre background-image
- 7. Button Changer d'étiquette sur EVT_BUTTON dans wxpython?
- 8. bootstrap div background-image
- 9. background image in layoutunit
- 10. Slideshow background image
- 11. Gtk # background image
- 12. Coloriser Background-Image
- 13. Background-Image fondu jquery
- 14. étendre background image hauteur
- 15. DirectX background image
- 16. Redimensionner div background image
- 17. Jquery - background-image click
- 18. Slideshow background image
- 19. iOS 6 background image
- 20. background image html
- 21. Flashy background image
- 22. CSS moving background image
- 23. CSS problème background-image
- 24. Dépannage CSS background-image
- 25. createElement background image
- 26. CSS background-image
- 27. background image css
- 28. iOS5 Toolbar background image
- 29. Footer background image css
- 30. silverlight grid background image
Qu'est-ce qui ne va pas avec GenBitmapTextButton? Il semble que cela ferait ce que vous décrivez. –
Non. Il ajoute juste du texte à côté de l'image. –