width

Increase columns width in Silverlight DataGrid to fill whole DG width

徘徊边缘 提交于 2019-12-20 12:28:04
问题 I have a DataGrid Control which is bound to a SQL Table. The XAML Code is: <data:DataGrid x:Name="dg_sql_data" Grid.Row="1" Visibility="Collapsed" Height="auto" Margin="0,5,5,5" AutoGenerateColumns="false" AlternatingRowBackground="Aqua" Opacity="80" > <data:DataGrid.Columns> <data:DataGridTextColumn Header="Latitude" Binding="{Binding lat}" /> <data:DataGridTextColumn Header="Longitude" Binding="{Binding long}" /> <data:DataGridTextColumn Header="Time" Binding="{Binding time}" /> </data

How to make table cell shrink according to the content?

走远了吗. 提交于 2019-12-20 09:46:15
问题 How can I make the table with 2 columns (cells) look like this: First cell is shrink according to the content The other cell fits the rest of the table (wider than both contents together) Example: <table style="width: 500px;"> <tr> <td>foo</td> <td>bar</td> </tr> </table> I need the table to look like this: .___________________________________________________________________________. | foo | bar <a lot of space here> | |_____|___________________________________________________________________

Why is SVG stroke-width : 1 making lines transparent?

故事扮演 提交于 2019-12-20 08:36:02
问题 I'm creating stock charts with svg and I'm having a problem when I set the stroke-width of my path elements to 1. Instead of making the lines more narrow, it just makes it the same size as stroke-width:2 but slightly transparent. I can't post an image of it though because I don't have enough reputation points... My svg tag looks like so: <div style="height:300px; width:400px; overflow:hidden"> <svg style="position:relative" height="10000" width="10000" version="1.1" xmlns="http://www.w3.org

Different window.innerWidth between chrome and firefox?

时光总嘲笑我的痴心妄想 提交于 2019-12-20 05:22:10
问题 html, body { position:absolute; width:100%; height:100%; margin: 0; padding: 0; overflow: hidden; } The window.innerWidth return different number from FX and chrome FX return 1429 while Chrome return 1159 , Why is the difference and how to fix it? Thanks. 回答1: It because the with of the document depends on how much of the viewport is available for the application body. It will depend on the thickness of the borders of the application, any other plugins which are active etc. demo here. This

Different window.innerWidth between chrome and firefox?

回眸只為那壹抹淺笑 提交于 2019-12-20 05:21:04
问题 html, body { position:absolute; width:100%; height:100%; margin: 0; padding: 0; overflow: hidden; } The window.innerWidth return different number from FX and chrome FX return 1429 while Chrome return 1159 , Why is the difference and how to fix it? Thanks. 回答1: It because the with of the document depends on how much of the viewport is available for the application body. It will depend on the thickness of the borders of the application, any other plugins which are active etc. demo here. This

Table's width frozen because of display: block

落花浮王杯 提交于 2019-12-20 03:57:06
问题 I created a page containing a table and some data in it. Although I set table's width to 80% of it's parent div, the inner tbody and other children's width is frozen to 450px. I also noticed that once I removed the property display: block , the table's children were correctly displayed (100% width of the table) I there a particular reason for width to be frozen at 450px ? I checked everywhere in my CSS, and I did not set such a rule. Here is the code of my table : <div id="maincol"> <table

Binding the Width Property of a DataGridColumn to the ActualWidth of the parent DataGrid

有些话、适合烂在心里 提交于 2019-12-20 03:46:12
问题 I tried to solve my previous question with manually binding the Width property of the DataGridTextColumn here is the first Version of my XAML Code. <DataGrid AutoGenerateColumns="False" Background="White" ItemsSource="{Binding Items, Mode=OneWay}" HorizontalGridLinesBrush="Silver" VerticalGridLinesBrush="Silver" Margin="332,10,10,10" CanUserAddRows="False" CanUserDeleteRows="False" x:Name="myDataGrid" ColumnWidth="*"> <DataGrid.Columns> <DataGridTextColumn Width="{Binding Path=ActualWidth,

Image native width in jquery

纵然是瞬间 提交于 2019-12-20 02:39:17
问题 With jQuery, i change the src of an image on click $("#thumb li img").click(function() { var newlinkimage = $(this).attr("src"); newlinkimage = newlinkimage.substring(14,17); $("#avant img").attr("src", 'retouche-hr' + newlinkimage + '-a.jpg'); $("#apres img").attr("src", 'retouche-hr' +newlinkimage + '-b.jpg'); The problem is, that the NEW image width is different that the old. HOW do i get the NATIVE width of the new image (like the little arrow that get that in dreamweaver 回答1: This is the

jquery的datagrid自适应浏览器的宽度

馋奶兔 提交于 2019-12-19 23:53:56
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 这个问题困扰我很久了,我试过好多方法,例如设置datagrid的width为auto,还有设置datagrid的fit为true,但是这种方法不行,然后我在网上发现有人写了一个扩展方法,链接为 http://www.myexception.cn/web/410060.html 。 按照这个链接提供的方法不能使高度按照内容来设置,因此我进行了修改,修改的代码如下: /** * JQuery扩展方法,用户对JQuery EasyUI的DataGrid控件进行操作。 */ $.fn.extend({ /** * 修改DataGrid对象的默认大小,以适应页面宽度。 * * @param heightMargin * 高度对页内边距的距离。 * @param widthMargin * 宽度对页内边距的距离。 * @param minHeight * 最小高度。 * @param minWidth * 最小宽度。 * */ resizeDataGrid : function( widthMargin, minWidth) { /* var height = $(document.body).height() - heightMargin; */ var width = $(document.body).width()

VHDL: Finding out/reporting bit width/length of integer (vs. std_logic_vector)?

被刻印的时光 ゝ 提交于 2019-12-19 19:36:50
问题 Say I need a signal to represent numbers from 0 to 5; obviously this needs 3 bits of std_logic to be represented ( i.e if MAXVAL=5, then bitwidth= { wcalc "floor(logtwo($MAXVAL))+1" } ). I'm aware I could do: SIGNAL myLogicVector : STD_LOGIC_VECTOR(2 downto 0) := 5; with which I'd explicitly specify an array of three std_logic 'bits', and set initial value; then I could use REPORT to print out the length (in this case, 3): report("Bit width of myLogicVector is "& integer'image(myLogicVector