Angular JS resizable div directive

This question is old, but for anybody looking for a solution, I built a simple directive to handle this, for vertical and horizontal resizers. Take a look at the Plunker angular.module(‘mc.resizer’, []).directive(‘resizer’, function($document) { return function($scope, $element, $attrs) { $element.on(‘mousedown’, function(event) { event.preventDefault(); $document.on(‘mousemove’, mousemove); $document.on(‘mouseup’, mouseup); }); function mousemove(event) { if ($attrs.resizer == ‘vertical’) … Read more

How to make resizeable?

The best method would be to use CSS3. It supported by at least Webkit and Gecko. According to the w3c spec: div.my_class { resize:both; overflow:auto; /* something other than visible */ } Webkit and Firefox do not interpret the specs the same way. In Webkit the size is limited to the width and height set. … Read more

Windows Forms window changes its size when I create a WPF window

You discovered that WPF calls SetProcessDPIAware(). It happens inside the module initializer for PresentationCore. Which is formally illegal, it must always be called before an app creates any windows or load DLLs that might cache the DPI value. Or in other words, lots of ways that this can go wrong, you only discovered the mild … Read more

Resize textField Based On Content

You have to use an UITextView instead of an UITextField. Then, you can use the sizeThatFits method. But first you have to know how high one line will be. You can get that information by using lineHeight: var amountOfLinesToBeShown: CGFloat = 6 var maxHeight: CGFloat = yourTextview.font.lineHeight * amountOfLinesToBeShown After that, just call the sizeThatFits … Read more

jquery resize listener on a div

As the thread poelinca provided suggests, there are some nice plugins available for this functionality. If you don’t like the plugin idea, another simple solution would be to simply trigger a “resize” event on the div whenever the content is modified. Then you could monitor it with resize() as expected, utilizing an elegant observer pattern. … Read more

PHPExcel auto size column width

If a column is set to AutoSize, PHPExcel attempts to calculate the column width based on the calculated value of the column (so on the result of any formulae), and any additional characters added by format masks such as thousand separators. By default, this is an estimated width: a more accurate calculation method is available, … Read more