resize

How to get the first n elements of a std::map

Since there is no .resize() member function in C++ std::map I was wondering, how one can get a std::map with at most n elements. The obvious solution is to create a loop from 0 to n and use the nth iterator as the first parameter for std::erase(). I was wondering if there is any solution that does not need the loop (at least not in my ...

How to get a reference to the Window object using GWTQuery?

The title pretty much says it all. I'm trying to use jQuery's ability (hoping GWTQuery has implemented it) to pass a callback function to the window.resize something like this(example from jquery site): $(window).resize(function(){ alert("Stop it!"); }); but when I tryi to type $(window) in Eclipse I get an error that window can not...

Resize image map on window resize

Hello, I'm trying to resize an image map on window resize event. The closest I've gotten is to use a mouseclick event, but it needs to be window resize for what I'm doing. I'm using Firefox 3.5.5 I'm using jquery somewhat. Here's my example - the area button I want to resize on window resize is in the top left (click on it to resize ma...

How to prevent window resizing temporarily?

I have a window which can be resized, but there are some situations when resizing is not possible because of the application state. Is there a way to prevent resizing the window temporarily? I want to disable resizing by all means available to the users, which include window menu, dragging edges by mouse, user initiated window tiling pe...

Image Resizing Question (PHP/GD)

I'm looking for help/suggestions in finding the most efficient way to resize an image to be as small as possible using PHP/GD while preserving the aspect ratio of the original image but ensuring the the resized image is bigger than a defined minimum width & height. For example, the resized image must have a width >= 400 and a height >= ...

How to refresh page on resize?

Is there a script to make the browser refresh when a page is re-sized? More specifically, one that emulates the browser refresh button or F5? I've found two, but they don't quite do what I'm looking for; <script type="text/javascript"> var currheight = document.documentElement.clientHeight; window.onresize = function(){ if(currheigh...

Cannnot resize Child Controls in a FlowLayoutPanel Control

Description I was trying to create a FlowLayoutPanel that can be extended, for instance in the horizontal way. FlowLayoutPanel and its sub component anchor has been set to Top-Left-Right FlowLayoutPanel direction has been set to TopDown. -> When rezising the FlowLayoutPanel, its sub- components are not resized accordinally. Step to r...

window.resize event firing in Internet Explorer

As you are aware, in Internet Explorer, the window.resize event is fired when any element on the page is resized. It does not matter whether the page element is resized through assigning/changing its height or style attribute, by simply adding a child element to it, or whatever -- even though the element resizing does not affect the dime...

resize uinavigationbar push/pop viewcontroller size issue

hi there, i need to shrink the height of a UINavigationBar (attached to the UINavigationController) i've done this via the UINavigationControllerDelegate's navigationController:didShowViewController method, and it's working fine. the problem is the visible viewcontroller that's in the main view. it wasn't resizing itself to reflec...

Objective C - how to resize a window programmatically with given window id?

How to resize a window of any application programmatically with objective-c / cocoa? So far I've got the app name and the window number but don't know how to access the window. I could do it with AppleScript but want to learn it with objective c. AppleScript example: tell application "System Events" set frontApp to name of first a...

ListView resize with user drag (VB.net)

I am converting my company's VB6 program over to VB.net and I have hit another stupid little roadblock. The old program had a ListView docked to the left side of the application screen. The user could place the cursor over the right portion of the ListView, the cursor would turn into the SizeWE arrows, then they could drag it, which wou...

HTML/CSS: Create a div that always fills the entire page... and then a resizeable div within it?

I feel like this is an easy question, but for whatever reason I can't figure it out today. I need a div that always fills the entire page, no matter how large that page is. Then I need another div which I can re-size with javascript (mydiv.style.width = x; mydiv.style.height = y;). If the second div is resized to be taller than the e...

Resizing an image in c# without losing lower an right pixel-parts

I have a c#-class that looks roughly like this: class ImageContainer { Image image; internal ImageContainer getResized(int width, int height) { Bitmap bmp = new Bitmap(width, height); //Create a System.Drawing.Graphics object from the Bitmap which we will use to draw the high quality scaled image System.Drawing.Graphics...

How to resize the IPhone video to a specific dimension, and add some more features.

Hi everyone! Did anyone tried to resize an video, for adding more views around it? Can anyone give me any hint/recommendation? Thanks in advance! ...

Resize dynamic iframe (problem with Chrome)

So I've been looking around at all the other Stack Overflow posts and around google about how to set the height/width automatically on an iFrame. I've gone through about 15-20 of them and none have worked for me so far. Let me try to explain my situation: I'm dynamically setting the body of an iFrame on my page. I'm needing the iFrame t...

C# Simple Image Resize : File Size Not Shrinking

I have a question in regards to the code below. The code I have below successfully runs through a directory, and sets the resoultion of the picture to a smaller size. However, the file size is not changed. For example, an image with dimensions of 2400x1800 with file size of 1.5MB will be scaled to 800x600, but the 800x600 picture will...

C# WPF - custom resizing

I am needing to make a custom window with WindowStyle.None, AllowsTransparency = true, etc. One requirement is a custom ResizeGrip control. I have this working with ResizeMode.CanResizeWithGrip, taking some code from an open source project found here: Fluid Kit See the "GlassWindow" class if you're interested. To do the work, I'm cal...

wxwidgets resize sizers after hiding/showing child controls

Hello, I have an wxWindow. Inside there I've got a wxBoxSize (Vertical). The sizer has 3 child controls. I want to be able to hide one of the three child controls, and have the sizer and its parent automaticly resize. For example when I hide one child control of the sizer, the window decreases by 200 pixels. Right now my method of sho...

How do I resize a Silverlight 3 application and all child controls and keep aspect ratio

Hi I'm building a Silverlight 3 application and I would like it to resize depending on the size of the web browser. I have found http://community.irritatedvowel.com/blogs/pete%5Fbrowns%5Fblog/archive/2008/07/04/How-to-Resize-a-Silverlight-2-App-and-Keep-the-Same-Aspect-Ratio.aspx But the solution suggested doesn't seem to work on s...

Resize an Image C#

Hello there, As Size, Width, Height are Get() properties for System.Drawing.Image, How can I resize an Image object at run-time in C#. Right now, I am just creating a new Image using: Bitmap objBitmap = new Bitmap(objImage, new Size(227, 171));//objImage is the origional Image Thank you! ...