w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Javascript .open opens maximized in Chrome
I'm testing your example on win7 and it works fine on chrome, at least for me Have a look at this fiddle Are you using it on a maximized (fullscreen) window on Mac? Btw, I would not recommend using window.open since it usually gets blocked by pop-up blocker Edit: tested on Chrome stable, build 28.0.1500.95 m

Categories : Javascript

How to avoid Chrome dragging content
Try adding the draggable="false" attribute to relevant elements. By default <img> and <a> elements can be dragged, as can selected text (not much you can do about that one). Alternatively, try adding ondragstart="return false;" to the document.

Categories : Javascript

DnD not working well in Chrome, no image while dragging
I think you disabled all effects under Performance Options in System settings. But Firefox can show the correct image even if all effects are disabled. Except this, I have no reason to use old ways of drag and drop. Is there a way to overcome this? I also encounter this problem.

Categories : HTML

Chrome Issue : overflow-x element scrolled by dragging
Add overflow:y; to your .inner class .inner{ border-left:400px solid red; border-right: 400px solid green; height: 600px; text-align: center; line-height: 400px; overflow:y; } http://jsfiddle.net/LULDC/ No more scrolling with click and drag!

Categories : CSS

Qt5 Android maximized application
I'm working on qml apps on android devices. include <QGuiApplication> include <QtQml/QQmlApplicationEngine> int main(int argc, char *argv[]) { QGuiApplication app(argc,argv); QQmlApplicationEngine engine; engine.load(QUrl("qrc:///main.qml")); return app.exec(); } (this is my main.cpp) and my main.qml is: import QtQuick 2.1 import QtQuick.Controls 1.0 ApplicationWindow { id: mainWin visible: true ... ... with the above code my app fits full screen on android and i can get the screen size with mainWin.width and mainWin.height.

Categories : Android

When maximized, why is there a line break after the word "and"?
I think you just need to remove the < br > from the text: <div style='overflow:hidden;background-color:black;'> <div style='overflow:hidden; color:white; float:left;'> <img style='width:64px;margin-bottom:50px;float:left; margin-right:10px;' src='/img/bigGreenCheckmark.png' /> Bookkeeping &amp; Business Services: Proven. Reliable. Accurate. Hassle-Free bookkeeping with No B.S. - Give us a chance and we'll prove it. </div> <div style='float:right; margin-right: 10px; color:#EFDD6F; font-size:1.5em; line-height: 2em;'>(310) 204-4717</div> </div>

Categories : CSS

maximized height on div bound to bottom
Thx to the guy who deleted his answer, it was close to be working. height is somehow ignored, but using top and position: absolute; it worked. When DIV 2 resizes, there must be an event triggered resizing DIV 3 tho: <body style="width: 100%; text-align: center;"> <div style="margin: 0 auto;text-align:center">container <div style="width: 200px; margin-top: 100px; float: left;"> left </div> <div style="width: 728px; float: left;"> <div style="height: 100px;" id="a"> 1 </div> <div style="height: 150px;" id="b"> 2 </div> <div style="background-color: red; position: absolute; bottom: 0;" id="test"> 3 </div>

Categories : CSS

SPLASH SCREEN HIDDEN BY MAXIMIZED FORM
Try this. Private Sub MDIMainForm_Load(sender As Object, e As System.EventArgs) Handles Me.Load System.Threading.Thread.Sleep(3000) 'Splash screen display time Me.WindowState = FormWindowState.Maximized End Sub For my project it's work.

Categories : Vb.Net

Non maximized browser messes up background image
Using a 100% x 100% absolutely positioned div for your background image is probably what's causing the issue. Switch to CSS classes on < body > .pic1 { background-image: '../path/to/image1'; } .pic2 { background-image: '../path/to/image1'; } etc And then instead of changing the src of the image tag you would change the class of < body >. This will allow you to remove the absolute positioning of that div and layout the site "normally".

Categories : Javascript

Maximized owned Form not restoring correctly
Here's one possibility... Add a property to the Owned form to track its last FormWindowState (could just be private if you don't care to expose it): private FormWindowState _lastState; public FormWindowState LastWindowState { get { return _lastState; } } Add an override for WndProc to the Owned form: protected override void WndProc(ref Message message) { const Int32 WM_SYSCOMMAND = 0x0112; const Int32 SC_MAXIMIZE = 0xF030; const Int32 SC_MINIMIZE = 0xF020; const Int32 SC_RESTORE = 0xF120; switch (message.Msg) { case WM_SYSCOMMAND: { Int32 command = message.WParam.ToInt32() & 0xfff0; switch (command) { case SC_MAXIMIZE: _lastState = FormWindowState.Maximized; break; case SC_

Categories : C#

Prevent Maximized WPF Window from Covering Taskbar
A customized WPF window does not respect the area occupied by the task bar. In order to do this, you need support from the Win32 API. The first method you will need is... [DllImport("user32.dll")] public static extern IntPtr MonitorFromWindow(IntPtr hwnd, int dwFlags); The MonitorFromWindow function retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window. http://msdn.microsoft.com/en-us/library/windows/desktop/dd145064(v=vs.85).aspx Set dwFlags = 2 The next one is... [DllImport("user32.dll")] public static extern bool GetMonitorInfo(HandleRef hmonitor, [In, Out] MonitorInfoEx monitorInfo); The GetMonitorInfo function retrieves information about a display monitor.

Categories : C#

Issue with 3 "rows" in a layout, middle one being maximized
Try using a RelativeLayout as the parent container with the following changes: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/eventActivityLayout" android:layout_width="match_parent" android:layout_height="match_parent" > <RelativeLayout android:id="@+id/infoBar" android:layout_width="match_parent" android:layout_alignParentTop="true" android:layout_height="wrap_content" android:background="#AAA" > <TextView android:id="@+id/left_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="3dp" android:textSize="12sp" /> <TextView android:id="@+

Categories : Android

setPreferredSize not working on panels when frame maximized on Windows XP?
OK, thanks to the prompts to use a LayoutManager, I did some digging in that direction. Turns out that JScrollPanes use JViewports which in turn use ViewportLayout implemenation of a LayoutManager. These have control over their delegated 'View' component. As can be seen in the modified code below, I override the layoutContainer method in here now to double the height of my 'movingPanel' in relation to the viewport and this works visibly better than before and when maximised in XP. Thanks import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.LayoutManager; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.sw

Categories : Java

How to Disable restore box of windows form when it is in maximized condition?
Have a look at this question: How do I remove minimize and maximize from a resizable window in WPF? The first and most upvoted answer doesn't belong to WPF only. So it should also work with a Winforms application.

Categories : C#

TAdvStringGrid is not aligning to full screen when form is maximized at run time
It worked out finally with the ColumnSize Stretch property of TAdvStringGrid by setting out ColumnSize.Stretch = True which helped me align TAdvSTringGrid table to the full screen..

Categories : Delphi

CPU usage not maximized and high synchronization in server app relying on async/await
It sounds like your server is almost completely asynchronous (async MSMQ, async DB, async HttpClient). So in that case I don't find your results surprising. First, there is very little CPU work to do. I'd fully expect each of the thread pool threads to sit around most of the time waiting for work to do. Remember that no CPU is used during a naturally-asynchronous operation. The Task returned by an asynchronous MSMQ/DB/HttpClient operation does not execute on a thread pool thread; it just represents the completion of an I/O operation. The only thread pool work you're seeing are the brief amounts of synchronous work inside the asynchronous methods, which usually just arrange the buffers for I/O. As far as throughput goes, you do have some room to scale (assuming that your test was floodin

Categories : C#

How to make PageControl occupy full screen when form is maximized at Delphi
Adjust the anchor(if you are on FireMonkey instead of VCL look at Margins and Padding properties) property of the PAgeControl to allow the auto resize of the component. Take a look at this video tutorial for more information.

Categories : Delphi

Validation error messages disappear when Trinidad component panelAccordion is minimized or maximized
One way you can achieve the desired effect is by submitting the form when a user clicks on each <tr:accordionPanel>. It supports many other client side events so pick one that best suits your needs.If you submit the entire form, this will force validation to kick in for all components however, whether the user entered a value or not. This might be the quickest and simplest way but some people might be picky and not like this solution. You can also make use of partial updates and partial triggers and submit only the components that are part of the current accordion panel based on the event you choose.

Categories : JSF

Given weighted points on a plane, find locations for U squares such that the total enclosed weight would be maximized
It's a geometric special case of the weighted maximum coverage problem. The general MCP is NP-hard, and I suspect that this special case is as well, though unlike the general case, it probably has an efficient polynomial-time approximation scheme. You want an optimal solution, however, so the first thing that I would recommend is to feed the integer linear programming formulation in the linked Wikipedia article to an LP solver. maximize sum_j (w_j * y_j) subject to for all i, sum_i x_i <= U for all j, sum_{i : j in S_i} x_i - y_j >= 0 for all i, x_i in {0, 1} for all j, 0 <= y_j <= 1 The weight w_j of each point j is given, and the sets S_i are all possibilities for covering points with a width L square. The meaning of x_i is whether set S_i is chosen. The meaning of y_j is

Categories : Algorithm

Xlib: How to ask window manager for maximized window size?
_NET_WORKAREA property of the root window is probably closest match. However on a multi-headed system it will give you the combined work area on all monitors. If that's what you want, fine (but see here on making a window span multiple monitors). If you want to maximize over a single monitor, then there's a problem as there's no per-monitor API like _NET_WORKAREA. Your best bet is creating a window in a maximized state and then querying its size. If that's not an option, I'm afraid you will have to query the number and sizes of available monitors, and then go and calculate the work area of each monitor by subtracting "struts" from the full area (see here about _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL).

Categories : Misc

NavigationWindow class: remove navigation bar and maximized NavigationWindow
You can host a Frame in your Window. That is essentially what a NavigationWindow does. MSDN has more info on navigation hosts.

Categories : C#

Dragging a QWidget in QT 5
The Qt wiki contains a QtQuick example on how to emulate the iOS icon interface with less then 80 lines of code. You can find it here.

Categories : Qt

Dragging a Path
In my opinion there is a problem in these lines: int modX = (int) (e.getX() + (e.getX() - p.x)); int modY = (int) (e.getY() + (e.getY() - p.y)); Consider two points A(1,5) and B(4,5). If user clicks in C(3,6), then point A will be translated to A'(5, 7) and point B to B'(2, 7). As you can see, points A and B will change places. You might want to store start drag position and calculate distance and updated path position using this information.

Categories : Android

c# label not dragging:
OK, I've found out that the RichTextBox doesn't have the standard drag-n-drop implementation. I has a property called EnableAutoDragDrop, just set this to true, it will handle everything automatically. You don't need any event registering for it except this one: richTextBox1.EnableAutoDragDrop = true; //Just this even without AllowDrop = true //RichTextBox doesn't even have DragOver event exposed, we have to cast it to Control to expose the base DragOver event ((Control)richTextBox1).DragOver += (s, e) => { e.Effect = DragDropEffects.Copy; }; Without registering the DragOver event handler, you have to use (hold down/press) the Control key while doing drag-n-drop.

Categories : C#

Simple object dragging in iOS
What you need to use is the UIPanGestureRecognizer applying to the object itself. Here is good tutorial on this.

Categories : IOS

Dragging an object in Swing
The reason the corner of the checker is "jumping" to your mouse is because of the way images are drawn. When you set the coordinates of the image you are setting the point P(0,0) of the image, which is the top-left corner when drawn on a screen. To fix this issue, in addition to keeping track of the row and column number, you need to keep track of the x and y offset (in pixels) you want to maintain though the mouse movement in each checker board "cell". This means when you click, you might click the checker in row 2, column 3, with an (x, y) offset of (12,14). I am assuming your squares are larger than 14x14 pixels. I turned your 42 into BOARD_X_OFFSET and 37 into BOARD_Y_OFFSET I have added two doubles cellX and cellY which hold the offset within the cell. This will make your set loca

Categories : Java

Expand View On dragging
use this i've using it for imageview but you can change it for UIView and make sure that userInterAction is True for that view declare it in .h file CGFloat lastScale; in viewDidLoad: UIPinchGestureRecognizer *pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(scale:)]; [pinchRecognizer setDelegate:self]; [imgRotate addGestureRecognizer:pinchRecognizer]; -(void)scale:(id)sender { if([(UIPinchGestureRecognizer*)sender state] == UIGestureRecognizerStateEnded) { lastScale = 1.0; return; } CGFloat scale = 1.0 - (lastScale - [(UIPinchGestureRecognizer*)sender scale]); CGAffineTransform currentTransform = [(UIPinchGestureRecognizer*)sender view].transform; CGAffineTransform newTransform = CGAffineTransformScale(currentTransform, scale, scale

Categories : Iphone

How to rotate a qml rectangle by dragging?
I would do it like this (i did a simpler code as I don't have Ubuntu Touch Components), but the rotation logic is here and the angle to second conversion too : import QtQuick 2.0 Rectangle{ id: root; width: 720; height: 480; color: "black"; Item { id: container; width: 250; height: width; anchors.centerIn: parent; property real centerX : (width / 2); property real centerY : (height / 2); Rectangle{ id: rect; color: "white"; transformOrigin: Item.Center; radius: (width / 2); antialiasing: true; anchors.fill: parent; Rectangle { id: handle; color: "red"; width: 50;

Categories : Qt

Styling the object while we are dragging it
It is partially possible In HTML5 you are not able to change the style of the ghost object but you are able to change the default ghost object with the setDragImage method from the DataTransfer object. Made an example here (the blu div will become a red div when dragged): <style> #div1{ background-color:blue; width:100px; height:100px; } #div2{ background-color:red; width:100px; height:100px; } </style> ... <div id="div1" draggable="true" ></div> <br/> <div id="div2" ></div> <script> document.getElementById('div1').addEventListener('dragstart', function(event) { event.dataTransfer.setDragImage(document.getElementById('div2'),50,50)

Categories : HTML

Raphael JS ellipse not dragging
I found the problem. The attributes defining the center of the ellipse are (cx,cy), not (x,y). So the first call in the former function should have been this.attr({cx: this.ox+dx, cy: this.oy+dy}); while the first two calls in the latter should have been this.ox = this.attr('cx'); this.oy = this.attr('cy');

Categories : Javascript

Adding and Dragging images into a div
take a look to this link it´s a start for you. in this link you have an example and you can check the source code of the javascript. what you have to do is to change the code for your needs

Categories : PHP

Pan resistance when dragging UIImageView?
How about subclassing UIImageView and doing something like below: (Not perfect , but something along this lines maybe?) -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ CGPoint currentPosition = [[touches anyObject] locationInView:self.superview]; CGFloat dx = currentPosition.x - initialCentre.x;//delta x with sign CGFloat dy = currentPosition.y - initialCentre.y;//delta y with sign CGFloat distance = sqrt(dx*dx + dy*dy);//distance CGFloat weightedX = initialCentre.x + dx * (1/log(distance)); //new x as inverse function of distance CGFloat weightedY = initialCentre.y + dy * (1/log(distance)); //new y as inverse function of distance self.center = CGPointMake(weightedX, weightedY);//set the center }

Categories : IOS

Dragging Multiple Images
There are two basic approaches: You can use the various touches methods (e.g. touchesBegan, touchesMoved, etc.) in your controller or the main view, or you can use a single gesture recognizer on the main view. In this situation, you'd use touchesBegan or, if using a gesture recognizer, a state of UIGestureRecognizerStateBegan, determine locationInView of the superview, and then test whether the touch is over one of your views by testing CGRectContainsPoint, using the frame of the various views as the first parameter, and by using the location as the second parameter. Having identified the view that the gesture began, then in touchesMoved or, if in a gesture recognizer, a state of UIGestureRecognizerStateChanged, and move the view based upon the translationInView. Alternatively (and easi

Categories : IOS

Hover like effect while dragging
You have a small mistake your condition should be: if ( event.pageX > $(this).position().left && event.pageX < ($(this).position().left + $(this).width()) && event.pageY > $(this).position().top && event.pageY < ($(this).position().top + $(this).height()) ) Have a look here: http://jsfiddle.net/straeger/fggKn/ Here is a more precisely version http://jsfiddle.net/straeger/TbwAT/1/

Categories : Javascript

keep helper under mouse when dragging
http://jsfiddle.net/margaret_/XM6f8/1/ Is this what you are looking for? Are you okay with using knockout? I can't add comments 'cause I don't have 50 reputation. <a href="#" data-bind="text: name, click: function() { viewModel.selectTask($data); }, visible: $data !== viewModel.selectedTask()"></a> <input data-bind="value: name, visibleAndSelect: $data === viewModel.selectedTask(), event: { blur: function() { viewModel.selectTask(''); } }" /> Use parent and previous location to mimic the function. ko.bindingHandlers.sortableList = { init: function(element, valueAccessor, allBindingsAccessor, context) { $(element).data("sortList", valueAccessor()); //attach meta-data $(element).sortable({ start: function(event, ui) { //track the origina

Categories : Javascript

When dragging onto a table, how do you tell which row got dropped onto?
you could use .index() or rowIndex to find that out, something like this in your code should do it: $('#mappingChar td').droppable( { hoverClass: "ui-state-hover", drop: function( event, ui ) { alert($(this).parent().index()+" or "+$(this)[0].parentNode.rowIndex); console.log('drop successful'); } });

Categories : Javascript

Dragging a div select whole text
Maybe use jQuery? : $("#yourID").focus(function() { var $this = $(this); $this.select(); // Work around Chrome's little problem $this.mouseup(function() { // Prevent further mouseup intervention $this.unbind("mouseup"); return false; }); });

Categories : Javascript

Dragging pictures in a slideshow
I think THIS is what you are looking for :) A jQuery project that makes you able to swipe it either with your mouse or with a cellphone

Categories : Jquery

Jquery UI: stop dragging
I believe draggable already has the behavior you want. Use the containment option with the array syntax instead of interrupting the drag event.

Categories : Jquery

Dragging a div to resize an image.
Bad math. With every step you adjusted the width of normal and applied delta X. You needed use the base width just like you used the handle_left. Also don't forget var for variable declaration -- they'll be part of the global scope if you don't and that'll get you later. el.onmousedown = function(e){ e.preventDefault(); var dragging = true, handle = $(e.target), x = e.clientX, handle_left = handle.position().left, normalWidth = $('.normal').width(); // base width window.onmousemove = function(e){ if(dragging == true){ var distance_w = e.clientX - x; handle.css('left', (handle_left + distance_w)+'px'); // reused width at start and applied delta $('.normal').css('width', normalWidth + d

Categories : Jquery



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.