w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to make AvalonDock's floating child window dock when user double-clicks its title bar?
I ended up modifying source of AvalonDock because it's just addition of 6 lines. If you know any better way, please post your answer. In switch statement of FilterMessage method of LayoutAnchorableFloatingWindowControl.cs case Win32Helper.WM_NCLBUTTONDBLCLK: _model.Descendents().OfType<LayoutAnchorablePane>().First(p => p.ChildrenCount > 0 && p.SelectedContent != null).SelectedContent.Dock(); break; In switch statement of FilterMessage method of LayoutDocumentFloatingWindowControl.cs case Win32Helper.WM_NCLBUTTONDBLCLK: _model.RootDocument.Dock(); break;

Categories : C#

Equalize height on two floating divs when window size is greater than specified width, then return to original height when window width is below
Working jsFiddle Demo Just remove height from elements: function originalHeight(group) { group.css('height', ''); }

Categories : Jquery

Fancybox loads php page, NOT on a floating window though
Twitter may not like being embedded in a div (which is essentially what fancybox does when left to its default behavior), so I would try adding type : 'iframe' to your parameter list. Especially if Twitter is actually performing a redirect.

Categories : PHP

Transfering text from floating window to messaging app
One way would be to get the instance of your floating window then create public methods that writes whatever you want to write: // Note that getInstance here is something that you make how you do it is up to you FloatingWindow.getInstance().setMessage("Hello World"); If you can't get the instance for some reason you can register custom BroadcastRecievers when you create your FloatingWindow: IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("com.example.floatingWindow.setMessage"); registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(action.equals("com.example.floatingWindow.setMessage") ){ writeYourMessage(intent.getStringExtra("messag

Categories : Android

Allow floating horizontal menu to resize with window without going to a new line
You can do this by using CSS display modes. Just set the ul to have display:table And the child list items to display: table-cell The table cells will automatically adjust thir width to fill the parent table at any width. You'll need to remove the explicit width from <li> and <a> to allow them to be automatic. I've updated the fiddle for you: http://jsfiddle.net/HSVdg/13/ Hope this helps.

Categories : HTML

Telerik RadDocking show ToolTip on floating window header
You can use the Title and TitleTemplate properties of RadPane to affect how the title of the ToolWindow is templated. They are similar to Header and HeaderTemplate just used when the pane is floating. Also, instead of using relative source from within the template of the header/title, supply the context/object that you need via binding at the window/UC level. I've changed your sample and it works on my machine (i.e. I can see the title when the pane is floating): <Window.Resources> <DataTemplate x:Key="DataTemplateTitleWithTooltip"> <TextBlock Text="{Binding TitleTootip}" ToolTip="{Binding TitleTootip}" telerik:WindowHost.HitTestable="True"/> </DataTemplate> </Window.Resources> <telerikDocking:RadDock

Categories : Wpf

Need to make a DIV appear as a floating footer that will remain in front of an iframe when the window is resized
I'm not sure this is what your asking but you can't show anything on top of an iframe I don't think, definitely not cross browser. But I doubt you need to. Now first off, your HTML seems improper because you open a <div class="ddoverlap">, then a <table>, then another <table> which contains the links. You close that 2nd <table> and then try to close the <div> while your still inside of the 1st <table>: <div class="ddoverlap"> <!-- 1st table --> <table align="center" cellpadding="0" class="CAATDashboardTable" cellspacing="0" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataV

Categories : CSS

How to add a floating view to Android Window manager and listen to System/Hardware back button events
Have a look at Standout Library , which is good for handling floating windows , it seems it is also not handling back press event , contacting developer might help. And one more way is you can try opening activity with semi transparent background/theme to get the similar effect used in floating window in Any.do and backpress event can be handled

Categories : Android

regular expressions for floating and non-floating point numbers followed by words
as java string : "^\d+(\.\d+)?\u0020(days|minutes|months|hours|years)\u0020ago$" as plain regex: ^d+(.d+)?u0020(days|minuits|hours|years)u0020ago$ i deliberately restricted the whitespace to only space character. doesnt seem tab and all is applicable here.

Categories : Java

CSS: Floating IMGs inside floating divs
I can't really provide a solution because you haven't provided any code. (please do so) That said... Based on your description and your image, your floats on div#A and div#B are breaking. The most common reason for this is that your width is adding up to be more than 100% of the width of your div#wrapper (the containing or parent element of the floated elements) Your floats should always end up equally 100% (less than 100% works but then you have some extra space somewhere etc). For example... If you have #wrapper which is 100px wide, then you can have two div's inside which are 50px and 50px wide, or 30px and 70px etc. as adding those values = 100px which is 100%. So... Why is yours breaking? I suspect it is because you are trrying to mix a dynamic width element, with a static

Categories : CSS

My inputcommand keybinding to main window does not work when child window is focussed(same wpf window)?
The key bindings will only work if the Form is focused. You could redirect every Command in your new Window to the Main Window Change your Constructor to of the new Window to accept a Main Window and save this window: MainWindow mainWindow; public Window(MainWindow w) { mainWindow = w; } Whenever a Keybinding executes just do something like this: mainWindow.TabPress(); And show the Window with Window childwindow = new Window(this) { Title = "ChildWindow", Width = 200, Height = 300 }; childwindow.Show();

Categories : C#

javascript/jquery : Window.open opens child window but after few seconds child window get automatically closed for some urls(for IE and chrome)
It's because this code is executed on init on https://wpc.gcsip.com/wpc/wpc page // check that this page is not in a subwindow (e.g. after a session time out) if ( window.opener ) { window.opener.location = "wpc"; window.opener.focus(); window.close(); }

Categories : Javascript

window.close closes the postbacked child window and a copy of child window still appears
The showModalDialog method will freeze JavaScript execution on the parent window until the dialog that it opens has closed, so we can rule out that as the reason why your second window opens. When FileUpload.aspx posts back from the server, it should work the same way as modeless aspx postbacks. I think you should be able to get rid of the window.open() method and you should be fine. Parent window: window.showModalDialog("FileUpload.aspx", "FileUpload", "center:yes;resizeable=yes;dialogHeight:300px;dialogWidth:600px;"); The Child window will call this when it's done. window.close();

Categories : Javascript

open the link from the popup window in an external window and then close the original popup window
Try <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';$.colorbox.close();"> or <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';parent.$.colorbox.close();">

Categories : Javascript

2 divs floating left inside a div. 2 of such divs floating left inside another div - height issue
It's not a good idea to use a lot of <div class="clear"></div> on your HTML pages. Here is an example on how to force an element to self-clear : .clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } .clearfix { display: inline-block; } * html .clearfix { height: 1%; } .clearfix { display: block; } Notice: Apply a class="clearfix" to the parent element.

Categories : HTML

Locking the size of a resizable window to the original aspect ratio of the window in Pyglet
Although this looks a little hackish for me, but at the moment I don't think of any other possibilities to solve you problem. Anyway, this is working: import pyglet window = pyglet.window.Window( resizable=True ) @window.event def on_resize( width, height ): ratio = 9/16 window.set_size( width, width*ratio ) @window.event def on_draw(): window.clear() pyglet.app.run()

Categories : Python

Why does Internet Explorer fire the window "storage" event on the window that stored the data?
Microsoft seems to be aware of the issue, but it doesn't look like they're going to fix it any time soon: https://connect.microsoft.com/IE/feedback/details/774798/localstorage-event-fired-in-source-window One option is that you can design your listeners and setters so that they don't react or store when they get information from a storage event that's already consistent with their state. However, this design pattern can be more difficult than relying on the storage event only firing on other windows. Another option is to make local storage work the same way in IE that it works in other browsers. I came up with an admittedly hacky but functional solution that I tested in IE10 and expect to work in IE8 and IE9. My javascript components don't listen to the window "storage" event directly bu

Categories : Javascript

pyGTK how to redisplay a top level window (with child widgets) after window destroy signal is sent
Have you tried making another copy of the window class and showing that one instead? Note: This will reset anything that was set in the window. i.e. if a person did something to make label1 say 'Hi!' instead of 'Hello!', it is going to be reset again to 'Hello!', since you are recreating the window.

Categories : Misc

Closing a process child window (e.g. a Word window) accessing a specific file
I found this very detail post about the subject, maybe it can help you http://forum.sysinternals.com/howto-enumerate-handles_topic18892.html That post hase some disucussions and related questions here http://forum.sysinternals.com/topic19403.html

Categories : C#

Javascript Window.Open how to obtain the opened child window from a different page
First its seen little bit tricky.. you declare some ajax function to send information to server whether child window opened or not.. if child window opened then refresh page. for E.g . -> assume that user opened 2 same page In different tabs1 and tab2. -> user opened opened popup window on tab2 and add/change some information.. -> tab2 content refresh as per ur event. you should also send a one flag to server with session id and tab1 continuous check is that any changes happed to server it will be refresh..

Categories : Javascript

How can I show alert in parent window from child popup window in javascript?
try this code <!DOCTYPE html> <html> <head> <script> function openWin() { myWindow=window.open('','','width=200,height=100'); myWindow.document.write("<p>This is 'myWindow'</p>"); refreshParent(); } function refreshParent() { window.parent.focus(); window.parent.alert("message"); window.parent.location.reload(); } </script> </head> <body> <input type="button" value="Open 'myWindow'" onclick="openWin()" /> </body> </html>

Categories : Javascript

how we can restrict user to click or go on the browser window until they close the opened pop up window?
You basically need a modal pop-up. This link should help you: http://www.codeproject.com/Tips/589445/JavaScript-Modal-Popup-Window

Categories : Javascript

Keeping slide-out div flush with left side of window upon window resize
Simply add: $(window).resize(function(e) { if ($("#slideout").css('left') != '0px') $("#slideout").css('left', -($("#slideout").width() - 15)); }); http://codepen.io/anon/full/rjaHD

Categories : Jquery

How I can see the width & height of my window on the "body" when I am modifying the size of the window with jquery?
Like that? DEMO http://jsfiddle.net/yeyene/5ANZz/1/ $('#width').val($(window).width()); $('#height').val($(window).height()); $(window).resize(function(){ $('#width').val($(window).width()); $('#height').val($(window).height()); });

Categories : Jquery

Jquery .scroll() not working in IE with both $(window) and $(document). (issue with window.pageYOffset?)
From the MDN docs: For cross-browser compatibility, use window.pageYOffset instead of window.scrollY. Additionally, older versions of Internet Explorer (< 9) do not support either property and must be worked around by checking other non-standard properties. You could always use jQuery's implementation of scrollTop(), it should work for all browsers: $(window).scroll(function() { var y_scroll_pos = $(this).scrollTop(); var scroll_pos_test = 200; if(y_scroll_pos > scroll_pos_test) { $('.extratext').slideDown('slow'); } });

Categories : Javascript

How to call enlarge-window function depends on current window in Emacs
Taking advantage of windmove being part of emacs, this is what you can do: (require 'windmove) (defun move-separator-up (arg) (interactive "p") (if (< (cdr (windmove-other-window-loc 'up)) 0) (shrink-window arg) (enlarge-window arg))) (defun move-separator-down (arg) (interactive "p") (if (< (cdr (windmove-other-window-loc 'up)) 0) (enlarge-window arg) (shrink-window arg))) When you have 3 windows, enlarge-window and shrink-window rules might not do always what you want, so some further customization might be needed.

Categories : Emacs

For Chat window.whether i go for dynamic user control or client side div tag pop up window?
I helped write and maintain a simple chat window in ASP.Net WebForms a while back, the way we did it was to use some simple JavaScript making some HTTP requests to a page which had WebMethods on it. The C# page contained a WebMethod for getting new messages from the server which was called from JavaScript running on a setTimeout loop. It also contained a WebMethod for adding new messages to the session. If I recall correctly, some kind of queue was used per user involved in the chat session and all the method for getting new messages did was to map the user to the correct queue and take all the messages that were present at the time. Hopefully this helps.

Categories : Asp Net

Can I interact with the current debugging session variables using C# Interactive window or Immediate window?
You could use linq to do anything you can do in a loop because it is evaluated as an expression for example R.Where(item => item != R[0]); Will show you all items not equal to the first item. Here is why you can do anything with a linq expression: Enumerable.Range(1,1).Select(one => { // any function code you want here //return any type of variable. });

Categories : C#

How do I detect if a new window has been opened? The window opens via a submit with target="_blank"
My recommendation would be to check beforehand if the user is using the app and then modify the behavior based on that, rather than checking if a new window opened. I have in the past accomplished this by checking the screen.width property (can be similarly accomplished in CSS), but you can do it more cleanly (courtesy of this post's answer): if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // some code.. } This is cleaner, as you can determine at load time whether you'll need to open in the current window or a new window, rather than reacting later to something that happens for the user.

Categories : Javascript

window.URL || window.webkitURL not working with Safari browser version prior 5
The window.URL APIs are not supported on Safari 5. Take a look at the table here: http://caniuse.com/#search=createObjectURL Only the most recent versions of current browsers support the API.

Categories : Javascript

Android Crash, java.lang.IllegalArgumentException: Window type can not be changed after the window is added
check Androidmanifest.xml <uses-sdk //************ android:targetSdkVersion="X"/> X must be less than 14 Or remove this attribute. good luck guy.

Categories : Android

Disable parent window when child popup window is open
Play around with this code in the pop-up: $(window).on("blur", function(){ ... }); This will fire every time the user leaves the window. Inside the argument function you should be able to make the window regain its focus, maybe using $(this).focus() or self.focus(). I haven't tested this myself. Good luck!

Categories : Javascript

How to find xpath of an element in a window that's inside another "frame window"
You have to switch control to inside the iframe and then try and interact with the webelement iframe = driver.find_elements_by_tag_name('iframe')[0] driver.switch_to_frame(iframe) and to come out of the iframe back to the main window driver.switch_to_default_content()

Categories : Python

window dot open hides half the newly opened window
Try something like below: function openPopup(url) { var x = screen.width/2 - 700/2; var y = screen.height/2 - 450/2; window.open(url, 'Test','height=485,width=700,left='+x+',top='+y); }

Categories : Javascript

OGRE - Multiple windows - render window and menu window
I prefer to use Qt for my GUI controls. I think it the most convenient library vor creating non-game GUIs. Combining Ogre and Qt is possible. There are code examples for Windows, Mac, Unix. Please have a look here.

Categories : Ubuntu

how to show data store grid on ext.window.window.modal
Remove width attributes from the modal grid. You cant specify width in % and if your containing parent has fit layout it doesn't matter anyway. Wrap items in an array: items: [modal_pp]

Categories : Extjs

Checking if a property exists in "window" fails if "window." is not prepended
The first version is property access, it can't find the property so it returns undefined. The second is trying to access undefined variable . Use what elclanrs suggested: if(typeof foo === "undefined"){ alert("exists"); } else { alert("doesn't exist"); } Why? This is because of the GetValue specified in the language specification. .3. If IsUnresolvableReference(V), throw a ReferenceError exception. This is what happens in the if(foo) case, since foo was not defined before. On the other hand, if its an object the following happens: Let base be the result of calling GetBase(V). Let O be ToObject(base). Let desc be the result of calling the [[GetProperty]] internal method of O with property name P. If desc is undefined, return undefined. So window.foo re

Categories : Javascript

chrome is opening window.open() in full window mode.
Maybe you can check your browser settings because I am in Chrome and the JSFiddle code worked perfectly fine for me. The browser opened with width 400 and height 200. Also, check your actual code to make sure it is the same as the one you posted.

Categories : Javascript

Window message WM_SIZING sending incessantly when window resizing
You could just process N messages before each frame.. where N is a limit you set between 1-10. That way you can process a reasonable number of events, then get onto your actual game logic. It's conceivable that Windows may just generate the 'window sizing' message continually when the queue is empty, to make sure applications are aware the window is being resized. (Maybe MS think applications might not know, maybe there's nothing else the user can do.. so MS want to hammer that single message.)

Categories : C++

How to execute main window key binding when child window is focussed in wpf?
WPF Behavior: Global Application Shortcut Keys Seems to be what you're looking for. I made a couple small modifications to the author's code to get your required functionality(rather than passing in an InputBindings collection, made the Behavior pick it from the AssociatedObject directly. Also took out the restriction for requiring modifier keys, Although I suggest you do read through the author's notes in the article and incorporate it to your requirements) Sample download for your requirements ^^ I could get your required behavior, however do go through the Behavior<T> to see if you can optimise it better for yourself(only bit's I actually looked into was just stuff relating to your specific requirement.)

Categories : C#



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