Search Results

Search found 10226 results on 410 pages for 'width'.

Page 2/410 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Limiting the width of a TextBlock in Silverlight

    - by Druzil
    The obvious MaxWidth gets ignored and the text in the "DisplayBox" TextBlock displays the whole text even if this text continues past the parent container controls (to the edge of the silverlight area. <win:HierarchicalDataTemplate x:Key="hierarchicalTemplate" ItemsSource="{Binding _children}"> <Border BorderThickness="0" BorderBrush="Orange" HorizontalAlignment="Stretch" Background="{Binding Converter={StaticResource BackgroundConverter}}"> <toolkit:DockPanel LastChildFill="True" Width="{Binding HeirarchyLevel, Converter={StaticResource WidthConverter}}" Height="20"> <Canvas toolkit:DockPanel.Dock="Right" Width="20" MouseLeftButtonUp="Arrow_MouseLeftButtonDown"> <Rectangle Width="20" Height="20" Fill="Transparent" /> <Line Stroke="Black" X1="5" Y1="10" X2="17" Y2="10" /> <Line Stroke="Black" X1="11" Y1="5" X2="17" Y2="10" /> <Line Stroke="Black" X1="11" Y1="15" X2="17" Y2="10" /> </Canvas> <Ellipse Canvas.Top="5" Width="10" Height="10" Fill="Green" toolkit:DockPanel.Dock="Right" MouseLeftButtonDown="Ellipse_MouseLeftButtonDown" /> <Canvas Width="Auto" Loaded="TextArea_Loaded"> <TextBlock Name="DisplayBox" FontFamily="Arial" FontSize="17" Foreground="Black" Width="Auto" Text="{Binding TaskName}" MouseLeftButtonUp="TextBlock_MouseLeftButtonUp" /> <TextBox Name="EditBox" FontFamily="Arial" FontSize="10" Foreground="Black" Height="20" Text="{Binding TaskName}" Visibility="Collapsed" LostFocus="TextBox_LostFocus" /> <Line Stroke="Black" X1="0" Y1="10" X2="202" Y2="10" Width="Auto" /> </Canvas> </toolkit:DockPanel> </Border> </win:HierarchicalDataTemplate>

    Read the article

  • wpf set barchart graph width programmatically C#

    - by Aizaz
    I have a chart and I am adding ColumnSeries and chart legend etc but how to programmatically set its bar width... ??? | |------| | | | | |set | | |this | | |width | | | | | | | | | |BarChart Graph |_______|______|_______________________________ <charting:Chart x:Name="mainChart" Grid.Row="0" Margin="0,8,8,8" Title="Protocols Usage" Height="Auto" Width="Auto" LegendTitle="Protocols" Background="#FFE5F1FE"> </charting:Chart> legend and others things produced on the fly... How to set width of ColumnSeries from C# code?

    Read the article

  • VBA: How go I get the total width from all controls in an MS-Access form?

    - by Stefan Åstrand
    Hi, This is probably very basic stuff, but please bear in mind I am completely new to these things. I am working on a procedure for my Access datasheet forms that will: Adjust the width of each column to fit content Sum the total width of all columns and subtract it from the size of the window's width Adjust the width of one of the columns to fit the remaining space This is the code that adjusts the width of each column to fit content (which works fine): Dim Ctrl As Control Dim Path As String Dim ClmWidth As Integer 'Adjust column width to fit content For Each Ctrl In Me.Controls If TypeOf Ctrl Is TextBox Then Path = Ctrl.Name Me(Path).ColumnWidth = -2 End If Next Ctrl How should I write the code so I get the total width of all columns? Thanks a lot! Stefan Solution This is the code that makes an Access datasheet go from this: To this: Sub AdjustColumnWidth(frm As Form, clm As String) On Error GoTo HandleError Dim intWindowWidth As Integer ' Window width property Dim ctrl As Control ' Control Dim intCtrlWidth As Integer ' Control width property Dim intCtrlSum As Integer ' Control width property sum Dim intCtrlAdj As Integer ' Control width property remaining after substracted intCtrSum 'Adjust column width to standard width For Each ctrl In frm.Controls If TypeOf ctrl Is TextBox Or TypeOf ctrl Is CheckBox Or TypeOf ctrl Is ComboBox Then Path = ctrl.Name frm(Path).ColumnWidth = 1500 End If Next ctrl 'Get total column width For Each ctrl In frm.Controls If TypeOf ctrl Is TextBox Or TypeOf ctrl Is CheckBox Or TypeOf ctrl Is ComboBox Then Path = ctrl.Name intCtrlWidth = frm(Path).ColumnWidth If Path <> clm Then intCtrlSum = intCtrlSum + intCtrlWidth End If End If Next ctrl 'Adjust column to fit window intWindowWidth = frm.WindowWidth - 270 intCtrlAdj = intWindowWidth - intCtrlSum frm.Width = intWindowWidth frm(clm).ColumnWidth = intCtrlAdj Debug.Print "Totalt (Ctrl): " & intCtrlSum Debug.Print "Totalt (Window): " & intWindowWidth Debug.Print "Totalt (Remaining): " & intCtrlAdj Debug.Print "clm : " & clm HandleError: GeneralErrorHandler Err.Number, Err.Description Exit Sub End Sub Code to call procedure: Private Sub Form_Load() Call AdjustColumnWidth(Me, "txtDescription") End Sub

    Read the article

  • jQuery resize width on firefox

    - by LM35DT
    I'm doing some experiments with jquery n widths for a liquid column and I'm not sure why it isn't working on firefox. It works fine on IE6,7,8 Chrome, Opera(sluggish). I found some articles about firefox not recognizing the .resize attribute but no explanation/solution =\ $(document).ready(function(){ $(midCol).width((window,$(window).width()) - 470) $(window).resize(function(){$(midCol).width((window,$(window).width()) - 470) }) });

    Read the article

  • not able to do max width

    - by Pradyut Bhattacharya
    Hi I have a page which has a content like this... <div id="content"> testingtestingtestingtestingtestingtestingtestingtestingtesting testingtestingtestingtestingtestingtestingtestingtesting testingtestingtestingtestingtesting </div> How do i apply a max-width on it . I m using this code in the css #content { max-width:50px; /* for standards-compliant browsers */ /*width:expression(document.body.clientwidth > 650? "650px": "auto" );*/ /* max-width expression for IE only */ } but i m not getting the results in firefox... http://pradyut.dyndns.org/WebApplicationSecurity/width.jsp Are there any JavaScript solutions? Any help thanks Pradyut

    Read the article

  • Android: Width and Height of View After Orientation Change

    - by David
    I need to get the width and height of a WebView and pass them in the query string of the URL I am loading in the WebView. I have found a way to do this in onResume(). Since the width and height are not calculated at this point, I post a Runnable to the WebView to be queued for after the UI loads. Here's my problem: when the orientation changes, I am handling it in onConfigurationChanged. When I try to post a Runnable in onConfigurationChanged to the WebView, the WebView's width and height end up being the old orientation's width and height. At what point can I intercept the new width and height after orientation change?

    Read the article

  • how do you get qTip to have proper width when loading content via ajax

    - by ooo
    i have an asp.net mvc site and here is a dynamic tooltip using qTip Here is my code: $('a.showNutritionInfo').each(function() { $(this).qtip({ content: { text: '<img src="../../images/ajax-loader1.gif" alt="" />', style: { width: 450 }, url: '/Tracker/NutritionInfo/' + $(this).attr('id'), method: 'get' } }); }); this works perfectly EXCEPT the width attribute listed above is ignored. No matter what i put in that width attribute, i get the same size width tooltip which is about half of the width that i need. the height is perfectly fine. any ideas? is this a bug in the product ?

    Read the article

  • Jquery tooltip plugin qTip doesn't seem to set width properly

    - by ooo
    i have an asp.net mvc site and here is a dynamic tooltip using qTip Here is my code: $('a.showNutritionInfo').each(function() { $(this).qtip({ content: { text: '<img src="../../images/ajax-loader1.gif" alt="" />', style: { width: 450 }, url: '/Tracker/NutritionInfo/' + $(this).attr('id'), method: 'get' } }); }); this works perfectly EXCEPT the width attribute listed above is ignored. No matter what i put in that width attribute, i get the same size width tooltip which is about half of the width that i need. the height is perfectly fine. any ideas? is this a bug in the product ?

    Read the article

  • [jQuery] Get width of element after resizing it

    - by infinito
    Hello, Is it possible to get the size of an element after resizing it using $(el).css()? My code is: function resize() { $(".combobox").css('width', '100%'); var width = $(".combobox").width(); } I've get the real value of the combobox only after calling the function a second time. The first time is gets the width before executing $(".combobox").css('width', '100%'); I suppose this is fault of the DOM not being recreated after the .css(). Is there any way to force DOM reloading? Thanks in advance!

    Read the article

  • HTML + CSS: fixed background image and body width/min-width (including fiddle)

    - by insertusernamehere
    So, here is my problem. I'm kinda stuck at the moment. I have a huge background image and content in the middle with those attributes: content is centered with margin auto and has a fixed width the content is related to the image (like the image is continued within the content) this relation is only horizontally (vertically scrolling moves everything around) This works actually fine (I'm only talking desktop, not mobile here :) ) with a position fixed on the huge background image. The problem that occurs is the following: When I resize the window to "smaller than the content" the background image gets it width from the body instead of the viewport. So the relation between content and image gets lost. Now I have this little JavaScript which does the trick, but this is of course some overhead I want to avoid: $(window).resize(function(){ img.css('left', (body.width() - img.width()) / 2 ); }); This works with a fixed positioned image, but can get a litty jumpy while calculating. I also tried things like that: <div id="test" style=" position: absolute; z-index: 0; top: 0; left: 0; width: 100%: height: 100%; background: transparent url(content/dummy/brand_backgroud_1600_1.jpg) no-repeat fixed center top; "></div> But this gets me back to my problem described. Is there any "script-less", elegant solution for this problem? UPDATE: now with Fiddle The one I'm trying to solve: http://jsfiddle.net/insertusernamehere/wPmrm/ The one with Javascript that works: http://jsfiddle.net/insertusernamehere/j5E8z/ NOTE The image size is always fixed. The image never gets scaled by the browser. In the JavaScript example it get's blown. So don't care about the size.

    Read the article

  • iPhone UIWebView width does not fit after zooming operation + UIInterfaceOrientation change

    - by choonkeat
    I created a bare bones iPhone app with a UIWebView (Scales Page to Fit = YES, shouldAutorotateToInterfaceOrientation = YES) and loaded a webpage, e.g. http://stackoverflow.com/ Rotating the device shows that UIWebView is auto-resized to fit the width. Good. Incorrect: Zoom into the page and zoom out. Now rotating the device shows UIWebView in a weird width in one of the orientation (if u zoom in landscape, the portrait width is weird, vice versa). This behavior is fixed only when you navigate to another page. Correct: Load the same URL in Mobile Safari. Rotating works & the width fits regardless of the zooming exercise. Is this a UIWebView bug (probably not)? Or is there something that needs to be done to make things "just work" like in Mobile Safari?

    Read the article

  • Dynamic tab width in a Flex 4 TabBar component with skin

    - by JoriDor
    Hi, I have a Flex 4 TabBar component with a custom skin. In this skin, the item renderer is defined with an ButtonBarButton with a custom skin. All the tabs in the itemrenderer have now the same width. The client however wants me to make the tabs width dynamically, so a smaller tab for a smaller label, a bigger one for a long label. Does anybody know how to adjust the width of Tab (ButtonBarButton)? Thanks a million!

    Read the article

  • CSS: Horizontal, comma-separated list with fixed <li> width

    - by hello
    Hello, I would like to achieve the following structure: [gfhtfg..., kgjrfg..., asd, mrhgf, ] ^-------^ ^-------^ ^-------^ ^-------^ X X X X (X = a fixed length) I've got a <div> with a fixed length, and inside it an horizontal, comma-separated list (ul) of links. The <li> elements should have a fixed width, and so if the links exceed a fixed length an ellipsis will be shown (using the text-overflow property). I know two ways to make a list horizontal. One is using display: inline and the other using the float property. With the first approach, I can't set a fixed width because the CSS specification doesn't allow setting the width of inline elements. The second approach creates a mess :O Setting float on the <a> element, intending to limit the width there, separates it from the commas. There are no browser-compatibility issues, I only have to support WebKit. I included the code I attempted to work with: <!DOCTYPE html> <html lang="en"> <head> <title>a title</title> <style> body { font-family: arial; font-size: 10pt; } div { height: 30px; width: 300px; background: #eee; border: 1px solid #ccc; text-align: center; } ul { margin: 0px; padding: 0px; } ul li:after { content: ","; } ul li:last-child:after { content: ""; } ul li a { text-decoration: none; color: #666; } ul li { margin: 0px; padding: 0px; list-style: none; overflow: hidden; text-overflow: ellipsis; -webkit-text-overflow: ellipsis; /* Inline elements can't have a width (and they shouldn't according to the specification */ display: inline; width: 30px; } </style> </head> <body> <div> <ul> <li><a href="#">a certain link</a></li> <li><a href="#">link</a></li> <li><a href="#">once again</a></li> <li><a href="#">another one</a></li> </ul> </div> </body> </html> Thank you.

    Read the article

  • Setting a Silverlight textbox control's width relatively

    - by John K.
    Hello, I tried searching on stackoverflow for an answer to my question but couldn't seem to find anything relevant. Since I'm relatively new to Silverlight, I'm not even sure if this is possible, but I am trying to figure out if it is possible to set a Silverlight textbox control's width value proportionally to it's immediate parent container? It would be nice to avoid hard coding a width value. Say you want to place a textbox control inside a horizontally aligned StackPanel control and have it's width always dynamically adjusted to be 80% of the total width of the StackPanel. Is this possible to do declaratively in your xaml markup, or will I need to resort to some codebehind attached to some event handler to accomplish this? fyi, I am currently using Visual Web Developer Express 2008 to write my silverlight code. thanks in advance, John

    Read the article

  • how do you control the width of a jquery ui autocomplete combobox

    - by oo
    i am using this jquery ui combobox autocomplete control out of the box off the jquery ui website: my issue is that i have multiple comboboxes on a page and i want them to have different widths for each one. i can change the width for ALL of them by adding this css: .ui-autocomplete-input { width:300px; } but i can't figure out a way to change the width on just one of them

    Read the article

  • How to set width of textbox to be same as MaxLength in ASP.NET

    - by John Galt
    Is there a way I can limit the width of a textbox to be equal to the MaxLength property? In my case right now, the textbox control is placed in a table cell as in this snippet: <td class=TDSmallerBold style="width:90%"> <asp:textbox id="txtTitle" runat="server" CausesValidation="true" Text="Type a title here..be concise but descriptive. Include price." ToolTip="Describe the item with a short pithy title (most important keywords first). Include the price. The title you provide here will be the primary text found by search engines that index Zipeee content." MaxLength="60" Width="100%"> </asp:textbox> (I know I should not use HTML tables to control layout..another subject for sure) but is there a way to constrain the actual width to the max number of characters allowed in the typed box?

    Read the article

  • Is it possible to set the width of a jquery autocomplete combobox

    - by oo
    i am using this jquery ui combobox autocomplete control out of the box off the jquery ui website: my issue is that i have multiple comboboxes on a page and i want them to have different widths for each one. i can change the width for ALL of them by adding this css: .ui-autocomplete-input { width:300px; } but i can't figure out a way to change the width on just one of them

    Read the article

  • Without width printing format in C

    - by yCalleecharan
    Hi, in C if I have a printf statement containing say "%.2f", it says that the precision is 2 digits after the decimal place. I haven't explicitly specify the width. I have two questions: Is this good programming practice?; Is without specifying the width means that the width of the field will get adjusted automatically when printing the number, irrespective of the number of digits it contains? Thanks a lot...

    Read the article

  • Div width: auto and IE

    - by Andrew Heath
    I'm using the jQuery qTip to show individual users and their votes when an average rating is mousedover. qTip calls a PHP file which grabs all the users and votes for the item from the MySQL database and builds a 3 column table, which appears as the tooltip. In Firefox, the tooltip displays properly. In IE7 (haven't tested on IE8 yet), the tooltip is the proper height, but the width is only 2 or 3 characters - not the entire table. If I set the width of the div to a fixed number, say width: 300px; I can coax IE into displaying it properly. However, the length of my users' names varies considerably, and I'd rather not nail down the div to its maximum possible width and then have a crapload of whitespace when you look at an item voted on only by "Joe". Using width: auto; has no effect in IE7. Are there alternatives? Sorry if I've overlooked a similar question. I searched for a bit before posting but didn't find anything suitable. EDIT TO ADD CODE: <div style="-moz-border-radius: 0pt 0pt 0pt 0pt; position: absolute; width: 358px; display: none; top: 384.617px; left: 463.5px; z-index: 6000;" class="qtip qtip-defaults" qtip="0"> <div style="position: relative; overflow: hidden; text-align: left;" class="qtip-wrapper"> <div style="overflow: hidden; background: none repeat scroll 0% 0% white; border: 1px solid rgb(211, 211, 211);" class="qtip-contentWrapper"> <div class="qtip-content qtip-content" style="background: none repeat scroll 0% 0% white; color: rgb(17, 17, 17); overflow: hidden; text-align: left; padding: 5px 9px;"> <div id="WhoResults"> <table> <tbody> <tr> <td>guy1</td> <td>guy2</td> <td>guy3</td> </tr> <tr> <td>guy4</td> <td>guy5</td> <td>guy6</td> </tr> </tbody> </table> </div> </div> </div> </div> </div> I have applied no CSS styling. That's all been handled by qTip. I tried to format it as best I could. Thanks for any help you can provide.

    Read the article

  • Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

    - by dwarbi
    I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while making the other visible. The div in portrait mode looks great on first load. I use this to get the right scale/zoom: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" /> Even if the content in portrait mode run over, the width is correct and the user can scroll down. The display in landscape mode is perfect too. However, if content in landscape mode requires the user the scroll down, then when the user returns to portrait mode, the screen is "zoomed out" so to speak. This happens whether or not the user scrolled down while in landscape mode. I've tried many different things to try to get the scale/zoom/width of the screen right, but no luck. Is there any way to do this? Thanks in advance!

    Read the article

  • WPF RibbonTextBox Width problem

    - by morsanu
    Hey guys, It seems to me that the Ribbon control has a problem with textboxes. I was expecting a common TextBox control behaviour: a fixed width and a visible caret when the text exceeds the width. But the RibbonTextBox control changes its width and when the text exceeds the right limit, the overflow is not visible. I found a hack on a blog that does something like this: var img = SearchButton.Template.FindName("image", SearchButton); if (img != null && img is Image) (img as Image).Visibility = Visibility.Collapsed; var lbl = FindTemplateControl<Label>(SearchText); var border = SearchText.Template.FindName("Bd", SearchText); if (border != null && border is Border && img != null && lbl != null) { (border as Border).Width = SearchText.ActualWidth - (((Image)img).ActualWidth + lbl.ActualWidth); } but I reallly don't want to do such a workaround. Is there any other simpler way to achieve simple TextBox behaviour?

    Read the article

  • Width of li with two floats different in IE, correct in FF

    - by Nathan Loding
    I've worked out most of the kinks with my "lava-lamp" effect that I'm trying to create. Basically I want two curly braces (both are images) to wrap a list-item, then follow over to the next list-item. I always build in FF, then make exceptions for IE. I can't figure out what exception I need to make! I'm using an absolutely positioned li that contains two div's. The first div is floated left, the second is floated right. The width of the li is set to the width of the li it supposed to be wrapping. Thus creating the effect of the braces on the left and right sides of the text. It works beautifully in Firefox, but IE has two issues: The bottoms of the images are cut off. Sometimes they reappear when the animation ends, sometimes they don't. I assume this has to do with height, but no matter what I set the height to, it fails! The width is completely wrong. Here's a live example of it: http://jsbin.com/odome/2 The left position in IE is always 5-7px more than in FF, but that's a small difference. I'm more concerned with the width and the bottoms of the images being trimmed. Thanks, as always, for the help!

    Read the article

  • How to set the width of a cell in a UITableView in grouped style

    - by Tomen
    I have been working on this for about 2 days, so i thought i share my learnings with you. The question is: Is it possible to make the width of a cell in a grouped UITableView smaller? The answer is: No. But there are two ways you can get around this problem. Solution #1: A thinner table It is possible to change the frame of the tableView, so that the table will be smaller. This will result in UITableView rendering the cell inside with the reduced width. A solution for this can look like this: -(void)viewWillAppear:(BOOL)animated { CGFloat tableBorderLeft = 20; CGFloat tableBorderRight = 20; CGRect tableRect = self.view.frame; tableRect.origin.x += tableBorderLeft; // make the table begin a few pixels right from its origin tableRect.size.width -= tableBorderLeft + tableBorderRight // reduce the width of the table tableView.frame = tableRect; } Solution #2: Having cells rendered by images This solution is described here: http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html I hope this information is helpful to you. It took me about 2 days to try a lot of possibilities. This is what was left.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >