border

Adding a dynamic TableLayout with borders in a Android App

蓝咒 提交于 2020-01-01 05:25:18
问题 I am creating a Android app. This Android App will have objects that are dynamic. These objects are Places with a Address or Lat/Long, and distance from current location, and a ETA. What I would like to do is add with objects on a TableLayout with borders, but I need to be able to dynamically add rows as the number of places increase. I understand somewhat how to do this for a fixed hardcoded number of items on the xml, but what would be the best way when the number of objects is coming from

Moving undecorated window by clicking on JPanel

℡╲_俬逩灬. 提交于 2020-01-01 04:43:27
问题 Is there a possibility to move window by clicking on one of the panels in the window when that window is undecorated? I have a main panel with matte border 40 pixels size, and few panels with controls inside, and I would like to move the window when clicking on that border. Is that possible? 回答1: You can place another panel over the panel with the border , leaving the border visible.Use the following code to move your window. public class MotionPanel extends JPanel{ private Point initialClick

Delphi. Remove a border of TabSheet of PageControl

久未见 提交于 2019-12-31 21:16:12
问题 Your help is needed. Is it possible to remove a border of TabSheet (~4px)? I am using PageControl as a switch-panel instead of frames, windows etc. I want everything will be straight. Big thanks for help! 回答1: unit Unit1; interface uses ..., CommCtrl; type TPageControl = class(ComCtrls.TPageControl) private procedure TCMAdjustRect(var Msg: TMessage); message TCM_ADJUSTRECT; end; TForm1 = class(TForm) ... end; ... procedure TPageControl.TCMAdjustRect(var Msg: TMessage); begin inherited; if Msg

CSS样式属性

浪尽此生 提交于 2019-12-31 12:38:26
CSS属性 属性1 宽和高 width 属性可以为元素设置宽度 height 属性可以为元素设置高度 PS:只有块级标签才可以设置宽度,内联标签的宽度由内容决定。 属性2 字体属性 文字字体: font-family 可以存放多种字体,如果浏览器不支持第一种字体会自动尝试下一种,浏览器会使用它能识别的第一种字体。如果到最后都没有浏览器支持的字体,那么就会使用浏览器的默认字体显示。 body { font-family: "Microsoft Yahei", "微软雅黑", "Arial" } 字体大小: font-size ,可以设置为数字px形式和 inherit ,设置为 inherit 表示继承父元素的字体大小值。 字重: font-weight 用来设置字体的字重(粗细)。 值 描述 normal 默认值,标准粗细 bold 粗体 bolder 更粗 lighter 更细 100~900 设置具体粗细,400等同于normal,而700等同于bold inherit 继承父元素字体的粗细值 字体颜色: color 用于设置字体的颜色,颜色可以通过三种形式指定: 十六进制:如:#FF000 (前两位表示Red,中间两位表示Green,最后两位表示Blue) 一个RGB值: 如: RGB(255,0,0) (第一个数字表示Red,第二个数字表示Green,第三个数字表示Blue

Jquery中的offset()和position()深入剖析

对着背影说爱祢 提交于 2019-12-31 06:56:05
jquery 中有两个获取元素位置的方法offset()和position(),这两个方法之间有什么异同?使用的时候应该注意哪些问题?什么时候使用offset(),什么时候又使用position()呢? 先看看这两个方法的定义。 offset(): 获取匹配元素在当前视口的相对偏移。 返回的对象包含两个整形属性:top 和 left。此方法只对可见元素有效。 position(): 获取匹配元素相对父元素的偏移。 返回的对象包含两个整形属性:top 和 left。为精确计算结果,请在补白、边框和填充属性上使用像素单位。此方法只对可见元素有效。 真的就这么简单吗?实践出真知。 先来看看在jquery框架源码里面,是怎么获得position()的: 代码如下: // Get *real* offsetParent var offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins // note: when an

Jquery中的offset()和position()深入剖析(元素定位)

本秂侑毒 提交于 2019-12-31 06:54:16
先看看这两个方法的定义。 offset(): 获取匹配元素在当前视口的相对偏移。 返回的对象包含两个整形属性:top 和 left。此方法只对可见元素有效。 position(): 获取匹配元素相对父元素的偏移。 返回的对象包含两个整形属性:top 和 left。为精确计算结果,请在补白、边框和填充属性上使用像素单位。此方法只对可见元素有效。 真的就这么简单吗?实践出真知。 先来看看在jquery框架源码里面,是怎么获得position()的: 1 // Get *real* offsetParent 2 var offsetParent = this.offsetParent(), 3 // Get correct offsets 4 offset = this.offset(), 5 parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); 6 // Subtract element margins 7 // note: when an element has margin: auto the offsetLeft and marginLeft 8 // are the same in Safari causing

Specify border appearance in tables using python-docx

≡放荡痞女 提交于 2019-12-31 04:30:15
问题 I am going through the tutorial and documentation of python-docx. However, I can't find any reference to how I can specify and manipulate the border appearance of a table created in a Microsoft Word document. When i use the following code: from docx import Document from docx.shared import Inches document = Document() ################################ ################################ ################################ table = document.add_table(rows=1, cols=3) hdr_cells = table.rows[0].cells hdr

盒子模型

爷,独闯天下 提交于 2019-12-31 03:40:42
盒子模型 页面布局的三大核心,盒子模型,浮动和定位 网页布局过程 先准备好相关网页元素,网页元素基本都是盒子Box 利用CSS设置好盒子样式,然后放到相应位置 往盒子里面装内容 盒子模型的组成 所谓盒子模型:就是把HTML页面中的布局元素看做是一个矩形的盒子,也就是 一个盛装内容的容器,CSS盒子包括:边框、外边距、内边距、和实际内容 border:边框 组成:边框宽度、边框样式 、边框颜色 border:border-width|border-style|border-color 属性 作用 border-with 定义边框粗细,单位是px border-style 边框样式:solid:实线边框、dashed:虚线边框、dotted:点线边框 border-color 边框颜色 边框简写 border:1px solid red; #没有顺序 表格边框的粗细 border-collapse:collapse; collapse:合并 border-collapse:collapse;表示相邻边框并在一起 【注意】 边框会额外增加盒子的实际 大小。两种解决方案 测量盒子大小的时候不量边框 如果测量的时候包含了边框,则需要width\height减去边框宽度 content:内容 padding:内边距 用于设置内边距,即边框与内容之间的距离 属性 作用 padding-left

利用target的特性,可以实现纯css的tab效果切换

一曲冷凌霜 提交于 2019-12-31 02:31:42
基础知识: :target起作用的是href连接到的位置 如 <a href="#tab1">tab1</a> <div id="tab1" class="tab">This is a tab1</div> :target{ color:red; } 但点击 a 标签的时候,连接到 id 是 tab1的div,对这个div 起作用 color:red; 如: <a href="#tab">Test :target</a> <a href="#tab2">Test 2:target</a> <div id="tab">This is a tab.</div> <div id="tab2">This is another tab.</div> #tab:target{ color:red; } #tab2:target{ color:blue; } 结果: 点击第一个 a 标签时连接到 id 是 tab的div,对这个div 起作用 color:red; 点击第二个 a 标签时连接到 id 是 tab2的div,不对这个div 起作用 color:red; 利用target的特性,可以实现纯css的tab效果切换 具体代码:(ie8以及ie8以下实现不了) <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> /

Creating a triangle div with CSS

和自甴很熟 提交于 2019-12-31 01:35:07
问题 I have recently learned how to create the appearance of a triangle div with CSS and HTML. Now, I would like to know if it is at all possible to add a border around any of the sides of the triangle div, so that if I gave the div a white background and a black border you could still see it? Is there a way I can do this? JSFIDDLE: http://jsfiddle.net/c75KM/1/ HTML: <div class="arrow-up"></div> CSS: .arrow-up { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid