Search Results

Search found 3163 results on 127 pages for 'fit pc2'.

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

  • flex DataGrid row auto fit content

    - by orangestar
    Hi, all! I try to create a DataGrid in flex which can fit its content. The itemEdit is a TextArea that can auto change its height while inputing. I set variableRowHeight="true" and wordWrap="true". Although The TextArea will auto resize but the height of row is not changed. Could anyone tell me how to change row height of DataGrid while inputing? One way I found is auto commit its text to DataGrid so the DataGrid will know the data changes but which function can commit its data? Thank you!

    Read the article

  • javascript - shorten string to fit into a certain # of lines

    - by Mala
    Hi I have a string that must fit into a box, and must be at most 3 lines long. To shorten it, I plan to truncate it and end it with '...'. I could shorten it to a certain # of characters but if i make it look good with "wwwwwwwww [...] wwww" it won't look right with "iiiiiiiiiii [...] iiii". Is there some way I can shorten it by how much space the string would take up, as opposed to how many characters there are in a string without using a fixed-width font? Mala ps. Please no "simply create an image of '...' and overlay it over the end of the line" hacks or similar - I actually want to shorten the string to the appropriate length

    Read the article

  • javascript/php - shorten string to fit into a certain # of lines

    - by Mala
    Hi I have a string that must fit into a box, and must be at most 3 lines long. To shorten it, I plan to truncate it and end it with '...'. I could shorten it to a certain # of characters but if i make it look good with "wwwwwwwww [...] wwww" it won't look right with "iiiiiiiiiii [...] iiii". Is there some way I can shorten it by how much space the string would take up, as opposed to how many characters there are in a string without using a fixed-width font? Ideally I'd like to do this server-side (php) but recognize that actual character width stuff is far more likely to be feasible client-side (JS / jQuery) Mala ps. Please no "simply create an image of '...' and overlay it over the end of the line" hacks or similar - I actually want to shorten the string to the appropriate length

    Read the article

  • android ImageView scaling to fit another View

    - by Nick
    I have a relative layout that comprises a TextView and an ImageView: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:adjustViewBounds="true"/> </RelativeLayout> It looks as follows: What I want to achieve is: It means that I want my ImageView to scale to fit the TextView by height. Can it be done in xml, without java-coding? If I could write something like android:layout_height="match_that_TextView" it would have solved this issue, but it's impossible I guess.

    Read the article

  • Fit <TD> height to page

    - by ssg
    Consider a table with three rows with heights 10, *, 10. I'd like the middle cell to be high enough to fit to the page vertically. Unfortunately "height:100%" doesn't work at table, tr, or td level, possibly due to standards. Even if it happens to work, I don't want 100%, I want 100% of clientHeight-20px :) I can always write script to calculate remaining clientHeight but I wonder if it can be achieved in HTML/CSS standards. NOTE: I'm using table just for layout, if there are other ways to lay them down in a better way I'm ok with those approaches too.

    Read the article

  • Resize Ext.form.ComboBox to fit its content

    - by ITRushn
    There are quite few solutions on Ext forums, but I wasn’t able to get any of them work. It seems I am missing something minor. I need to resize combobox to fit its content when it’s first created. I do not need to worry about resizing it when content is changing. Is there any working examples using Extjs 3.2? Current Code: var store = new Ext.data.ArrayStore({ fields: ['view', 'value', 'defaultselect'], data: Ext.configdata.dataCP }); comboCPU = new Ext.form.ComboBox({ tpl: '<tpl for="."><div class="x-combo-list-item"><b>{view}</b><br /></div></tpl>', store: store, displayField: 'view', width: 600, typeAhead: true, forceSelection: true, mode: 'local', triggerAction: 'all', editable: false, emptyText: 'empty text', selectOnFocus: true, listeners: { select: AdjustPrice, change: AdjustPrice, beforeselect: function (combo, record, index) { return ('false' == record.data.disabled); } }, applyTo: 'confelement' }); I've also tried removing width: 600 and replacing it with minListWidth: 600 but that result following and didnt fix the issue.

    Read the article

  • User controls do not properly fit on the screen

    - by Royson
    Hi, My application has several controls. Like in one screen has TreeView on left side, GridView with paging in the middle and 4 buttons at right side. The controls properly appear when the form is in a maximized state, but if I minimize it the controls do not properly fit on the screen. I tried with different different tricks like table layout.. in dat I added a panel, etc... But I could not solve the problem. How can I create such type of screens which fits independently of size of my window? Thanks

    Read the article

  • How to fit page to Silverlight WebBrowser control?

    - by Igor V Savchenko
    Hello. I use WebBrowser Silverlight 4 control to load some page: <WebBrowser Height="350" Name="webBrowser" Width="400" /> ... webBrowser.Navigate(new Uri("http://mail.live.com")); But page loads with horizontal and vertical scroll bars. So I'm trying to find some ways to get actual size of loaded page (then I can change Height/Width of control) OR change scale of loaded page (to fit it to the actual WebControl control). Is it possible to do with standard WebControl methods?

    Read the article

  • How to set an Image fit to width of ScrollViewer

    - by Raj
    I've Image placed inside a ScrollViewer. <ScrollViewer x:Name="imageScroller" Grid.Column="2" Margin="5" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible"> <Image x:Name="imageViewer" Cursor="Hand" RenderTransformOrigin="0,0" Margin="0"> <Image.LayoutTransform> <ScaleTransform ScaleX="{Binding Path=Zoom, Converter={StaticResource debugConverter}}" ScaleY="{Binding Path=Zoom, Converter={StaticResource debugConverter}}"/> </Image.LayoutTransform> </Image> </ScrollViewer> How do I zoom image like "fit-to-width" in document viewers to the size and height of ScrollViewer?

    Read the article

  • NSTableView - Trying to fit exactly 9 rows

    - by Justin808
    Hi, I'm trying to size the rows of a NSTableView to exactly 9 rows fit. I've tried [menuTableView setRowHeight:floor(menuRect.size.height / 9)]; and I've tried [menuTableView setRowHeight:(menuRect.size.height / 9)]; and [menuTableView setRowHeight:ceil(menuRect.size.height / 9)]; but all of them have the same issue, if I've selected row 0 then row 9 is clipped at the bottom and if I select row 9 then row 0 is clipped at the top. How can I set up a NSTableView to show 9 full rows so no matter what there is never a partial row visible? Thanks, edit: Yes menuRect is the frame for the menuTableView

    Read the article

  • Data frame linear fit in R

    - by user1247384
    This is perhaps a simple question, but I am n00b.Say I have a data frame with a bunch of columns. I need to call lm function over the column 1 and 2, 1 and 3, and so on. So basically I need to loop over all columns and store the results of the fit as I build the model. The problem I am running into is that lm(df[1]~df[2], data = df) doesnt work. In this case df is the data frame object and df[1] is the first column. What is a good way to do this in a loop, as in access the columns of df in an iterative fashion. Thanks.

    Read the article

  • algorithm to combine data for linear fit?

    - by BoldlyBold
    I'm not sure if this is the best place to ask this, but you guys have been helpful with plenty of my CS homework in the past so I figure I'll give it a shot. I'm looking for an algorithm to blindly combine several dependent variables into an index that produces the best linear fit with an external variable. Basically, it would combine the dependent variables using different mathematical operators, include or not include each one, etc. until an index is developed that best correlates with my external variable. Has anyone seen/heard of something like this before? Even if you could point me in the right direction or to the right place to ask, I would appreciate it. Thanks.

    Read the article

  • how do i let text fit to UIButton?

    - by iAsk
    problem: Button size is enough, however when I change title, the title text cannot fit the button width. Any SDK function can solve this problem, or I need to manually code to solve it? Please refer to following pictures. design in the nib file. initial show in simulator when I change the title text tried some ways before _button.titleLabel.adjustsFontSizeToFitWidth = YES; the way will change my font size. I cannot accept the way. [_button setTitleEdgeInsets:UIEdgeInsetsMake(10.0, 10.0, 0.0,0.0)]; the way change label's position only, not label size. [_button.titleLabel sizeToFit]; result is same with picture(3). [_button sizeToFit]; title moved to upper left corner, and the title still the same result. Just confused, my button size is big enough, why title size is so small?

    Read the article

  • In R, how do you get the best fitting equation to a set of data?

    - by Matherion
    I'm not sure wether R can do this (I assume it can, but maybe that's just because I tend to assume that R can do anything :-)). What I need is to find the best fitting equation to describe a dataset. For example, if you have these points: df = data.frame(x = c(1, 5, 10, 25, 50, 100), y = c(100, 75, 50, 40, 30, 25)) How do you get the best fitting equation? I know that you can get the best fitting curve with: plot(loess(df$y ~ df$x)) But as I understood you can't extract the equation, see Loess Fit and Resulting Equation. When I try to build it myself (note, I'm not a mathematician, so this is probably not the ideal approach :-)), I end up with smth like: y.predicted = 12.71 + ( 95 / (( (1 + df$x) ^ .5 ) / 1.3)) Which kind of seems to approximate it - but I can't help to think that smth more elegant probably exists :-) I have the feeling that fitting a linear or polynomial model also wouldn't work, because the formula seems different from what those models generally use (i.e. this one seems to need divisions, powers, etc). For example, the approach in Fitting polynomial model to data in R gives pretty bad approximations. I remember from a long time ago that there exist languages (Matlab may be one of them?) that do this kind of stuff. Can R do this as well, or am I just at the wrong place? (Background info: basically, what we need to do is find an equation for determining numbers in the second column based on the numbers in the first column; but we decide the numbers ourselves. We have an idea of how we want the curve to look like, but we can adjust these numbers to an equation if we get a better fit. It's about the pricing for a product (a cheaper alternative to current expensive software for qualitative data analysis); the more 'project credits' you buy, the cheaper it should become. Rather than forcing people to buy a given number (i.e. 5 or 10 or 25), it would be nicer to have a formula so people can buy exactly what they need - but of course this requires a formula. We have an idea for some prices we think are ok, but now we need to translate this into an equation.

    Read the article

  • Subview of custom NSView is resizing itself to fit within its superview

    - by Jonathan Patt
    I have a custom NSView which contains a subview—for the purposes of solving this issue, the top level view is simply acting as a container and automatically resizes to fit within the window. Its subview draws a rectangle 10 pixels inset from the edge of the window, except for the bottom, which should get clipped by the window until it's resized to show the entire rectangle. It does not, however, behave as I intend, and instead shrinks the height of the rectangle when its superview has a smaller height than it does. How do I avoid this and have it stay at its proper height and instead get clipped when the superview is smaller? The parent view's implementation code is: - (id)initWithFrame:(NSRect)frameRect { self = [super initWithFrame:frameRect]; if (self) { subView = [[SubView alloc] initWithFrame:frameRect]; } return self; } - (void)drawRect:(NSRect)dirtyRect { [[NSColor grayColor] set]; [subView setFrame:NSMakeRect(10, 10, dirtyRect.size.width - 20, 500)]; [self addSubview:subView]; } - (BOOL)isFlipped { return YES; } And the subview is just: - (void)drawRect:(NSRect)dirtyRect { [[NSColor blackColor] set]; [NSBezierPath strokeRect:dirtyRect]; } - (BOOL)isFlipped { return YES; }

    Read the article

  • Flex: How to resize DisplayObject to fit panel in Flex application

    - by ohm
    I am trying to attach some of my actionscript class, inherited from Sprite, to my Flex application by attaching it to a UIComponent, then add UIComponent to a panel. However, the size of my Sprite class appears to be larger than the panel. So, I try to resize it using DisplayObject.scale property, but I need to know the size of my container. Since I try to make my code reusable, I figure that I should let my Sprite class handle the resize by getting it via its parent property (let's say, I can resize it by set this.scaleX = this.parent.Width/this.width or something like this) However, my Sprite class's parent, which is the UIComponent, has width/height of 0. So, my question is: 1) Is there any better way to resize DisplayObject class to fit its container when attached to Flex object? 2) If you know, why my UIComponent's size remain 0 and my DisplayObject still appears at its full size? Here's my code, using Flash Builder 4: private var loader:Loader = new Loader(); private function testLoader():void { var urlRequest:URLRequest = new URLRequest("http://localhost/welcome.png"); loader.load(urlRequest); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderLoadComplete); } private function onLoaderLoadComplete(e:Event):void { loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,onLoaderLoadComplete); var ui : UIComponent = new UIComponent(); ui.addChild(loader); panelTest.addElement(ui); trace("ui.width = " + ui.width); trace("ui.height = " + ui.height); trace("loader.width = " + loader.width); trace("loader.height = " + loader.height); trace("panelTest.width = " + panelTest.width); trace("panelTest.height = " + panelTest.height); } And this is the result when run: ui.width = 0 ui.height = 0 loader.width = 571 loader.height = 411 panelTest.width = 480 panelTest.height = 320

    Read the article

  • jquery/javascript - image resize to fit screen

    - by alberto
    not an expert programmer. i created this code to resize photos/images to fit the screen, considering the space available for the nav bar. the script happens on load of image, and on click of the navigation. is it a good piece of code, or could it be done better? any browser issues? in the html: $(document).ready(function(){ $("#photo").load(function(){ resize(); }); $(".navigation img").click(function(){ var imgPath = $(this).attr("src"); $("#photo").attr({ src: imgPath }); resize(); return false; }); }); while this is my function resize: resize = function() { var borderVt=150; //value based on css style. bottom bar + padding of photoContain var borderHz=40; //value based on css style photoContain padding $("#photo").css("width", "auto").css("height", "auto"); // Remove existing CSS $("#photo").removeAttr("width").removeAttr("height"); // Remove HTML attributes var origSizeW = $("#photo").width(); var origSizeH = $("#photo").height(); var ratioVt=(origSizeW/origSizeH); var ratioHz=(origSizeH/origSizeW); var winW = $(window).width(); var winH = $(window).height(); var screenSizeW=Math.round(winW-borderHz); var screenSizeH=Math.round(winH-borderVt); if (origSizeW>=origSizeH){ var newHeight = Math.round(screenSizeW*ratioHz); if (newHeight <= screenSizeH){ $("#photo").css("width", screenSizeW); // Set new width $("#photo").css("height", newHeight); } else{ $("#photo").css("height", screenSizeH); } } else{ $("#photo").css("height", screenSizeH); // Set new height } };

    Read the article

  • C & MinGW: Hello World gives me the error "programm too big to fit in memory"

    - by user1692088
    I'm new here. Here's my problem: I installed MinGW on my Windows 7 Home Premium 32-bit Netbook with Intel Atom CPU N550, 1.50GHz and 2GB RAM. Now I made a file named hello.h and tried to compile it via CMD with the following command: "gcc c:\workspace\c\helloworld\hello.h -o out.exe" It compiles with no error, but when I try to run out.exe, it gives me following error: "program too big to fit in memory" Things I have checked: I have added "C:\MinGW\bin" to the Windows PATH Variable I have googled for about one hour, but ever since I'm a newbie, I can't really figure out what the problem is. I have compiled the same code on my 64-bit machine, compiles perfectly, but cannot be run due to 64-bit <- 16-bit problematic. I'd really appreciate, if someone could figure out, what the problem is. Btw, here's my hello.h: #include <stdio.h> int main(void){ printf("Hello, World\n"); } ... That's it. Thanks for your replies. Cheers, Boris

    Read the article

  • Website does not automatically fit to iphone screen

    - by Ploetzeneder
    Hello, The following code does not fit onto the iphone screen; how do I have to define the viewport? <html> <body> <center> <div id="karteu" style="background: url('../customer/Karten/karte1.jpg') no-repeat left center;width:714px;height:540px;" > </div> </body> </html> Normally the site should be zoomed, so i first should see the website in small, and then be able to zoom that i see it in the original size, but in my case it does not, when i call the site, the zoom is, that the image has this original size already, and that i have to scroll, but i dont want to scroll,...i want to use the normal safari mobile zoom and then scroll The solution at the bottom does not zoom anything. I want to see the overview of the image at the beginning. Then i want to be able to zoom with the normal safari zoom functions,..

    Read the article

  • XUL: fit all elements vertically in prefpane

    - by Michael
    here goes the XUL part of one of the preference panes. <prefpane id="alt-about" label="About" image="chrome://alt/skin/about.png"> <hbox> <vbox> <image id="armliveticker-about-logo" /> </vbox> <vbox> <description id="addonName">Bla bla bla, bla bla</description> <description id="version"/> <description>Author: bla bla bla</description> <description>ICQ: bla</description> <description>E-mail: [email protected]</description> <description>Website: www.bla-bla.com</description> <separator class="groove" flex="1"/> <description>News feed powered by Bla agency</description> <description>Exchange Rates are powered by Blaaaa Blaa of Blabla</description> </vbox> </hbox> </prefpane> and for some reason the window is not being vertically resized to fit last description element I tried many attributes, many combinations of vbox/hbox.. same. How to solve it guys?

    Read the article

  • Kindle Fire Cant Fit My Webpage inside a Webview of specific size

    - by Madhavan Rangarao
    This is baffling to me. Please help, I could not figure it out ... In my sample html file I have set the meta tag to be <meta name="viewport" content="target-densitydpi=device-dpi, user-scalable=no"> to fit the webpage inside my webview of custom size say 800x600. In Android, I had to specify "target-densitydpi=device-dpi" and it did the job nicely. I tested my custom web page with nexus 7 tablet and the web page fits inside my web view correctly. The same code does not work in Kindle Fire. Only a part of my web page is shown and even if I set the 'initial-scale=1.0' did not help. I tried various settings programmatically but it did not help either. webview.getSettings().setBuiltInZoomControls(true); webview.getSettings().setSupportZoom(true); webview.getSettings().setLoadWithOverviewMode(true); webview.setInitialScale(1); webview.getSettings().setUseWideViewPort(true); Any pointers?

    Read the article

  • Resize issue to fit dynamically with any browser size

    - by Qpixo
    I'm trying to make full flash site dynamically resize in any browser size. If the browser gets smaller than the site MC should constrain to fit in the browser. (EX: 1440x900) What I have right now works like 98% of the time, but when I switch to a bigger screen size, it screws up and makes the site tiny from left to right (menu, logo, etc.) (Ex:1680x1050) Does anyone know how to fix that issue?? positionScenesOnStage(); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; stage.addEventListener(Event.RESIZE, handleObjectsOnStage); private function handleObjectsOnStage(event:Event):void { positionScenesOnStage(); } private function positionScenesOnStage():void { backgroundMC = new bgMC(); backgroundMC.x = 0; backgroundMC.y = 0; backgroundMC.width = stage.stageWidth; backgroundMC.height = stage.stageHeight; addChild(backgroundMC); logo_mc = new LogoMC(); logo_mc.x = stage.stageWidth - 1420; logo_mc.y = stage.stageHeight - 700; addChild(logo_mc); menuContainer = new MenuContainerMC(); menuContainer.x = stage.stageWidth - 400; menuContainer.y = stage.stageHeight - 680; addChild(menuContainer); }

    Read the article

  • Stretching a Table's Width to fit web browser

    - by Techn0guy
    Okay so I have sowered the internet for a long time trying to solve my problem. I have a table with my whole site in it and would like for it to stretch to fit the user's web browser size. Here is all the site's code atm <body> <table width="100%" border="0"> <tr> <td width="525" rowspan="2"><img src="My Images/Speaker.png" width="525" height="772" ondragstart="return false" /> </td> <td width="697" height="16"> *Flash Video Here* </td> </tr> <tr> <td><img src="My Images/Vymil.jpg" width="822" height="597" ondragstart="return false"/></td> </tr> </table> </body> </html> Any helpful solutions would be greatly appreciated

    Read the article

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