标签: border

python win32com excel边框格式

我在这里有一段代码,它实际上可以使用 python win32com 在 excel 中格式化边框。我担心的是格式化边框所需的时间。我试图在 excel 中记录一个宏,以找出在我的脚本中转置它所需的信息,但它没有用。

所以我能做的最好的事情是在 for range 循环中运行,我总是从第 3 行开始,直到一个名为 shn[1] 的行计数器,增量为 1,从第 1 列到 10,增量为 1。从那里我使用“BorderAround()”,它工作正常但速度太慢。这是我的一段代码:

for shn in [("Beam-Beam", bb_row, bb_col), ("Beam-Col", bc_row, bc_col)]:
sheet = book.Worksheets(shn[0])
sheet.Range( "J3:DW3" ).Copy()
if shn[0] == "Beam-Col":
    sheet.Range( "J3:AA3" ).Copy()
sheet.Range( sheet.Cells( 4, 10 ), sheet.Cells( shn[1]-1, 10 )  ).PasteSpecial()
for mrow in xrange(3,shn[1],1):
    for mcol in xrange(1,10,1):
        sheet.Cells(mrow, mcol).BorderAround()#.Border(1)
Run Code Online (Sandbox Code Playgroud)

我可以做些什么来格式化具有 ==> sheet.Range( sheet.Cells(3,1), sheet.Cells(shn[1],10) ) 之类的范围的边框?我试过“.Borders(11)”和“.Borders(12)”加上“.BorderAround()”,但只有“.BorderAround()”有效。

提前致谢。

python excel border win32com

1
推荐指数
1
解决办法
6014
查看次数

Python:无边框列表框

我想要一个表格,但是当我意识到 python 中没有表格时,我决定用两个列表框来修复它。

关键是,我不希望它们之间有边界。

所以我的问题是:如何从Python中的Tk列表框中删除边框?

即使它会变白我有一个解决方案......

python listbox tkinter border

1
推荐指数
1
解决办法
3317
查看次数

在 ExtJS 5 中:如何移除文本框的边框

在 ExtJS 5 中,我想删除文本字段的边框并使其像这样: 在此处输入图片说明

当然可以通过两个标签来完成,但不是很干净。我在 ExtJS5 官网上尝试了以下两种方法,但是不行:

Ext.create('Ext.form.Panel', {
title: 'Contact Info',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
    // here 1
    xtype: 'textfield',
    name: 'name',
    fieldLabel: 'Name',
    border: 0,    // set border = 0 or false
    hideBorders: true
}, {
    // here 2
    xtype: 'textfield',
    name: 'email',
    fieldLabel: 'Email Address',
    style: 'border: none;background-image:none;'   // set style border none
}]
Run Code Online (Sandbox Code Playgroud)

});

结果: 在此处输入图片说明

有人有任何想法吗?谢谢。

extjs border textfield extjs5

1
推荐指数
1
解决办法
6341
查看次数

如何在半透明图像周围绘制边框?(CSS)

我想知道如何在半透明的图像周围绘制边框,即我不需要框形边框,也不需要边框半径,而是实际适用于图像本身形状的边框。

根据这篇文章这是不可能的,这个只是建议在某些照片编辑程序(例如 Photoshop)中编辑图像。

但是如果图像输入不是我的呢?如果我需要将一系列用户输入的图像处理到我的网站并添加该边框,则该软件选项将不起作用。

解决这个问题的一种方法是使用画布,但是没有一种纯粹、简单的 css 方法来做到这一点吗?谢谢。

css png image border

1
推荐指数
1
解决办法
4361
查看次数

列表周围的 Html/Css 边框

嘿,我想知道如何在无序列表周围和列表周围制作边框。有点像盒子。我试图在网上搜索它,但我根本无法弄清楚。

html css border

1
推荐指数
1
解决办法
1万
查看次数

使用渐变使边框图像工作

我正在开发一个使用 react.js 和 sass 作为样式的 web 应用程序(所以我所有的样式文件都是 .scss)。我有一个当前样式的文本框:

input[type=text] {
  text-align: center;
  font: inherit;
  border: 6px solid #999999;
  padding: 5px 5px;
  font-size: 15px;
  box-shadow: 0 1px 1px #DDD;
  width: 223px;
  outline: none;
  display: block;
  color: #7B8585;
  margin: 0 auto 20px;
}
Run Code Online (Sandbox Code Playgroud)

在某些时候,我的应用程序想要更改边框颜色。这就是我所拥有的:

var borderStyle;
if (gradient) {
  borderStyle = {
    'borderImage': '-webkit-linear-gradient(left, #0083c5 0%, #0083c5 33%, #ec4a26 66%, #ec4a26 100%)',
  };
}
Run Code Online (Sandbox Code Playgroud)

后来,输入组件:

<input type="text" style={borderStyle} onChange={this.handleChange} />
Run Code Online (Sandbox Code Playgroud)

目前我看到的是一个白色边框,边框的每个角都有一个红蓝渐变的小图像。我试过使用borderColor,显然它根本不适用于渐变。我是否遗漏了一些明显的东西,或者不可能做一个简单的边框渐变?

所需的结果是从左到右的渐变(因此左边框完全为蓝色,右侧完全为红色,顶部和底部边框具有蓝色到红色的过渡)。


针对Harry的回答,我改成如下代码:

input[type=text] {
  text-align: center;
  font: inherit;
  border: …
Run Code Online (Sandbox Code Playgroud)

html javascript css border reactjs

1
推荐指数
1
解决办法
808
查看次数

如何只填充边框底部的一半?

我有几个<li>内联列出,每个都有以下属性:

border-bottom-color: #eee;
Run Code Online (Sandbox Code Playgroud)

我试图第一个和最后一个目标<li>并填充它们border-bottom#eee但只填充一半。结果,第一个的底部边框<li>将从右侧开始填充 50%,最后一个的底部边框<li>将从左侧开始填充 50%。

我怎样才能做到这一点?除了可能只是height: 1px在我的ul.

css border linear-gradients

1
推荐指数
1
解决办法
7984
查看次数

在 JTable 中的单元格之间添加边框

我试图将 JTable 显示为网格,单元格之间有线条。不过,我只能在单个单元格中添加边框,这看起来永远不正确;如果我添加完整的边框,我会得到一堆断开的框,看起来很丑陋和错误。使用 MatteBorders(如下面的代码)看起来会好一些,但会导致边界线不完全相交的间隙。

public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
    Component stamp = super.prepareRenderer(renderer, row, column);
    int top = 1;
    int left = 1;
    int bottom = row == 7 ? 1 : 0; //Grid is always 8x8, this ensures the bottom/right will have full borders.
    int right = column == 7 ? 1 : 0;
    MatteBorder border = new MatteBorder(top, left, bottom, right, Color.BLACK);
    if (stamp instanceof JComponent) {
        ((JComponent) stamp).setBorder(border);
    }
    return stamp;
}
Run Code Online (Sandbox Code Playgroud)

我觉得必须有某种方法可以正确地做到这一点,这样我才能在单元格元素之间获得网格线。我错过了什么?如果不出意外,有没有办法让 …

java swing border jtable

1
推荐指数
1
解决办法
4244
查看次数

在悬停时添加边框会移动周围的元素

只需将鼠标悬停在下面片段中的“标题”上,您就会看到元素是如何移动的。为什么?

没有边距 .. 只有当我向inline-block元素添加边框时它们才会移动。尝试添加更多边框宽度, section.twelve a例如:

section.twelve a {
        border-bottom: 10px solid #FFFAFF;
    }
Run Code Online (Sandbox Code Playgroud)

但是如果你移除边框一切都很好..为什么会出现这种行为?它仅用于边界吗?

我只想向元素添加任何样式而不影响其他样式。

section.twelve a {
        border-bottom: 10px solid #FFFAFF;
    }
Run Code Online (Sandbox Code Playgroud)
section{
    position: relative;
    height: 300px;
    padding: 15px 80px;
    z-index: 1;
}

section h1{
    font-size:3em;
    font-weight: 100;
    line-height: 1.3;
 
}

section a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    vertical-align: bottom;
}

section.twelve {
    background: #121A5A;
    color: #FFFAFF;
}
section.twelve a {
    color:#D8315B;
    font-weight: 700;
    overflow: …
Run Code Online (Sandbox Code Playgroud)

html css border

1
推荐指数
1
解决办法
2813
查看次数

如何快速在 UIView 上应用带边框的锐角半径?

我想在 UIView 上设置带有边框的左下角和右下角半径。这是代码。**问题是它没有在 1.5 边框中显示 SHARP **

class BorderView: UIView {

  override func draw(_ rect: CGRect) {

    let color = UIColor.red
    let color2 = UIColor.brown

    //// Rectangle Drawing
    let rectanglePath = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: 200, height: 200), byRoundingCorners: [.bottomRight, .bottomLeft], cornerRadii: CGSize(width: 10, height: 10))
    rectanglePath.close()
    color2.setFill()
    rectanglePath.fill()
    color.set()
    rectanglePath.lineWidth = 1.5
    rectanglePath.stroke()

 }
}
Run Code Online (Sandbox Code Playgroud)

输出

在此处输入图片说明

预期产出

在此处输入图片说明

border layer cornerradius uiview swift

1
推荐指数
1
解决办法
2767
查看次数