Alternative to Chrome Extension “Window Resizer”

Another native solution to test responsive designs is to use the built-in Chrome Developer Tools. Choose Tools->Developer Tools, then click the gear icon in the bottom-right corner of the window that pops up. Click “Enable” then click “Device Metrics” and you can specify whatever resolution you’d like to replicate. Also, by changing the “User Agent” … Read more

Having trouble getting UIView sizeToFit to do anything meaningful

The documentation is pretty clear on this. -sizeToFit pretty much calls -sizeThatFits: (probably with the view’s current size as the argument), and the default implementation of -sizeThatFits: does almost nothing (it just returns its argument). Some UIView subclasses override -sizeThatFits: to do something more useful (e.g. UILabel). If you want any other functionality (such as … Read more

Window resize directive

I think you forgot to fire digest cycle by calling scope.$apply(); at the end of scope.onResize method Anyways, I used following directive (took from HERE) that works for me: Try to open debug view and change view height: Demo Fiddle app.directive(‘resize’, function ($window) { return function (scope, element, attr) { var w = angular.element($window); scope.$watch(function … Read more

Vertically (only) resizable windows form in C#

You need to set the form’s MinimumSize and MaximumSize properties to two sizes with different heights but equal widths. If you don’t want the horizontal resize cursor to appear at all, you’ll need to handle the WM_NCHITTEST message, like this: protected override void WndProc(ref Message m) { base.WndProc(ref m); switch (m.Msg) { case 0x84: //WM_NCHITTEST … Read more

How to move and resize a form without a border?

Some sample code that allow moving and resizing the form: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; this.DoubleBuffered = true; this.SetStyle(ControlStyles.ResizeRedraw, true); } private const int cGrip = 16; // Grip size private const int cCaption = 32; // Caption bar height; protected override void OnPaint(PaintEventArgs e) { … Read more

How to resize AlertDialog on the Keyboard display

If your dialog was an activity using one of the Dialog themes you could effect this behavior by setting the adjustResize flag for the windowSoftInputMode parameter of the activity. I’m using: android:windowSoftInputMode=”adjustResize|stateHidden” I think you can still use this flag with regular dialogs, but I’m not sure how to apply it. You may have to … Read more

Why has the std::vector::resize signature been changed in C++11?

Paragraph C.2.12 of the Annex C (Compatibility) to the C++11 Standard specifies: Change: Signature changes: resize Rationale: Performance, compatibility with move semantics. Effect on original feature: For vector, deque, and list the fill value passed to resize is now passed by reference instead of by value, and an additional overload of resize has been added. … Read more