Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add an outline border to a widget?

How can I add a outline border to a widget in wxpython? (Any widget, for example, a wx.Button)

like image 281
user1513192 Avatar asked Aug 12 '12 14:08

user1513192


People also ask

How do you add an outline border in Flutter?

Steps to add border to container in Flutter:Step 1: Go to the Container in which you want to add a border. Step 2: Add the decoration parameter and assign the BoxDecoration class. Inside the BoxDecoration add the parameter border and set it to Border. all().

How do you put a border on a text widget in Flutter?

If you want to add border to some text of container then you can easily to do it by applying BoxDecoration to Container. Show activity on this post.

How do you add a border to an image in Flutter?

To add border to image in Flutter, first, wrap the Image widget inside the Container widget. Inside the Container, add the decoration property and assign the BoxDecoration widget. Using the border property of BoxDecoration, you can provide the Border. all() widget to create border around the image.


1 Answers

For panel, you can use

p = wx.Panel(....., style=wx.SUNKEN_BORDER)

there you can choose from constants:

wx.SIMPLE_BORDER
wx.RAISED_BORDER
wx.SUNKEN_BORDER
wx.NO_BORDER

If you want to create border around wx.Button, i would use my custom bitmap with wx.BitmapButton:

b = wx.BitmapButton(pane, -1, wx.Bitmap('buttons/my_beautiful_button.png'))

For any widget, i think you can always create a wx.Panel with some border and put the widget into the panel.

like image 112
Stanislav Heller Avatar answered Sep 23 '22 00:09

Stanislav Heller