width

Is it possible to prevent a multi line HeaderText in a DataGridView?

非 Y 不嫁゛ 提交于 2019-12-04 00:12:13
When the length of the HeaderText property reaches a certain character limit and there is a space in the text, WinForms automatically inserts a link break in the header: What I want: +-----------------------+--- | Measurement Value (%) | ... +-----------------------+--- What I get: +-----------------------+--- | Measurement Value | ... |(%) | +-----------------------+--- There is more than enough space to display all header cells without the lines breaks, but for whatever reason it is still inserted even when I set the AutoSizeMode to HeaderCell . How can I prevent these line breaks, while

CSS make textbox fill all available width

▼魔方 西西 提交于 2019-12-03 23:28:41
I have the following "line" in my web page <div style="width:100%"> "Some Text" <DropDown> "Some more text" <TextBox> <Button> <Button> </div> The DropDown control I don't really have control over the width, as it sizes to fit whatever the longest option value is. The Buttons are fixed width. How can I get the TextBox to fill all available remaining width? I tried putting it in a table but run into the same problem, ie how do I make all other columns as small as possible to fit their content and then the TextBox column fill remaining width? Hacky solutions are fine if necessary, I've long ago

How automatically adjust div's width using CSS?

十年热恋 提交于 2019-12-03 21:53:47
Consider the following example : HTML: <div class="wrapper"> <div class="left">Some text here</div><div class="right">Hello Stack Overflow</div> </div> CSS: .wrapper { border: 1px solid black; width: 400px; } .left { border: 1px solid green; display: inline-block; } .right { border: 1px solid red; display: inline-block; float: right; } I would like to force the width of the green div to be as big as possible, according to the width of the red one. The width of the red div can vary according to div 's content. So, for example, if the width of the red div is 150px, the width of the green one

Media Queries min-width not firing correctly in Opera, FF and IE

泪湿孤枕 提交于 2019-12-03 21:27:43
问题 I use media queries on a page http://test.lovecpokladu.cz/detail-mince?id=2461 like this: @media all and (min-width: 660px) { ... styles for box decoration ... } and use this meta viewport tag: <meta name="viewport" content="width=device-width, initial-scale=1.0"/> When I resize Chrome's window to 660px (measuring just the HTML page, not window borders), styles apply correctly. Styles don't apply in 659px, which is correct. Problem is with Opera, IE and Firefox. The styles apply as soons as

Dropdown Menu - Make the <ul> submenu 100% width

流过昼夜 提交于 2019-12-03 21:18:09
问题 I am going a bit crazy trying to achieve something my client wants. I could tell them it's not possible but I love a good challenge ;) Basically, I'm trying to do a dropdown menu in which the dropdown <ul> , or: ul.menu li ul is surrounded by a div. Kind of: <ul class="menu"> <li> <a href="#">Item</a> <div class="submenu"> <ul>.....</ul> </div> </li> </ul> I want that div to have width:100% and fill the whole width of the page but have the UL inside aligned to the appropriate <li> . The

Increase UITextField to Certain Length

▼魔方 西西 提交于 2019-12-03 20:11:53
I have a UITextField that I would like to "automatically" adjust its bounds size in order to make space for the string added in the field. However, I would like it to max-out in terms of width at a certain amount. What is the best way that I can go about doing this? Thanks for any help. EDIT: TestingView.h #import <UIKit/UIKit.h> @interface TestingView : UIView <UITextFieldDelegate> { } @end TestingView.m #import "TestingView.h" @implementation TestingView - (void)awakeFromNib { CGRect testingBounds = self.bounds; testingBounds.size.width = testingBounds.size.width - 20; testingBounds.size

Image caption width to same as image

ε祈祈猫儿з 提交于 2019-12-03 18:48:37
问题 How can I make image caption width same as image? Now I have the following code: <div class="image"> <img src="foo.jpg" alt="" /> <div>This is the caption.</div> </div> I've tried a lot of things (floating, absolute positioning etc), but if the caption is long, it always makes the div wide instead of going on many lines. The problem is that I don't know the width of image (or the length of caption). Is the only way to solve this use tables? 回答1: So the problem is that you don't know how wide

Set spinner width to current item width

断了今生、忘了曾经 提交于 2019-12-03 16:57:01
By default the spinner width is set to fit the largest item in the dropdown but I want it to be the same width as the selected item. <android.widget.Spinner android:id="@+id/tab_spinner" android:layout_width="wrap_content" android:layout_height="match_parent" android:entries="@array/countries" /> As you can see in the right side image, the spinner is way too long, because of the long item in the list. How can I resize it to the selected item width ? By default, Spinner will try to measure some of your dropdown views and use the max width found. This happens in Spinner#measureContentWidth() , a

UITextfield text position not animating while width constraint is animated

送分小仙女□ 提交于 2019-12-03 16:53:28
I have three UITextField aligned in a container used to choose a date. At first only the month textfield is shown in the container and takes the full width, then when the user chose the month, the day textfield appear and they both take half of the container. The text alignement in these textfields is centered. My problem is that when I animate their size, the text doesn't animate and jumps directly to the final position while the width of the textfields animate correctly . Step 1 : The TextField Before Animation Step 2 : The TexField width is animating but the text is already in the final

Javascript to determine table width/height

自古美人都是妖i 提交于 2019-12-03 16:39:37
I've got some JavaScript I'm trying to use to define my table width/height to make it fluid across different resolutions. It seems to work fine for the width but I can't get it to work for the height. It is setting the correct number into the correct variable, it's just not setting the tables height. Here's what I got.. <html> <head> <script type="text/javascript"> var viewportwidth; var viewportheight; var tablewidth; var tableheight; if (typeof window.innerWidth != 'undefined'){ //set's viewport width/height into respective variables viewportwidth = window.innerWidth, viewportheight = window