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#

Set an icon similar to mac when minimized it to dock
Window class has method setIconImages which requires java.util.List<? extends Image> as an argument. You will have to pass a list of images with different sizes so that OS can choose one from that list for each specific situation - would it be minimized icon, icon for dock/toolbar, icon for window or icon for any other system-specific UI element. I usually pass a lot of images for my own application in different sizes: 16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256, 512x512 The large ones are usually used by large toolbars or by folder view to display icons for files associated with your application. Also usually 16x16 icon is used as window (frame/dialog) icon. Other icons can be used in a lot of different situations which depends on what OS you have (Windows, Mac OS e.t.c).

Categories : Java

Enabling the dock icon on Mac with WxPython
The document you link to states that you need to add those event handlers on the App. You have currently defined them on a frame. So you need to extend wx.App and define those event handlers, and instantiate your own App instead of wx.App. So (shortened example copied from your link): class MyApp(wx.App): def __init__(self, *args, **kwargs): wx.App.__init__(self, *args, **kwargs) # This catches events when the app is asked to activate by some other # process self.Bind(wx.EVT_ACTIVATE_APP, self.OnActivate) #..... def MacReopenApp(self): """Called when the doc icon is clicked, and ???""" self.BringWindowToFront() app = MyApp(False) app.MainLoop()

Categories : Python

How to open the Configure Launcher Icon window in the android developer tools (ADT)?
You are referring to a wizard that helps you build your initial application. It creates a generic icon and labels it ic_launcher.png and places it in each of your drawable folders. If you want to change your icon just name your file "ic_launcher" and size it according to Google's standards and place it in each drawable directory. There is also a final file ic_launcher-web.png in the root of your project that you must replace as well. If you want to use a generator to make your icon you can use the Android Studio Launcher Icon tool here. Just create it and follow my above steps for setting it up. Finally a note from Google on proper icon sizes:

Categories : Android

Grunt bounces my terminal dock icon on OSX
It looks like grunt is appending the terminal bell character (x07) to fail messages, see here: https://github.com/gruntjs/grunt/blob/25728e1744836b42927962a005fe1ce15f55640f/lib/grunt/fail.js#L31 Reading the code, it looks like you can disable this terminal bell by specifying the 'color' grunt option (which doesn't make sense to me). You can stick this in the top of your gruntfile: grunt.option('color', false); (I would love to know if there is a more elegant way of specifying grunt options.)

Categories : Osx

Qt 4.8.5 Mac Handle file dropping on dock icon
Mac OS X applications typically save their settings in ~/Library/Preferences/ using an XML document called a Property List. If you use the QCoreApplication::setOrganization(..) et all methods, just use QSettings and your code will remain cross platform and do the right thing. Handling file dropping on the application icon is a little more involved but there is already a pretty good answer and also a Qt Quarterly dealing with this problem. It will basically involve: Setting up the Info.plist in the application bundle to identify what files types are handled by your application. Subclassing QApplication to handle QEvent::FileOpen.

Categories : Osx

Multiprocessing Qt app: How can I limit it to a single icon in the MacOS/X Dock?
Call QSystemTrayIcon::hide(). If that doesn't work, here are some things you can try: Use NSApplication's setActivationPolicy: method Way 1: [NSApp setActivationPolicy: NSApplicationActivationPolicyAccessory]; Way 2: [NSApp setActivationPolicy: NSApplicationActivationPolicyProhibited]; OR Use LSUIElement (LSUIElement=1). You can also put this in your pfile: <key>LSUIElement</key> <string>1</string> or make Qt do it for you. There is also some discussion about OSX menus on the Qt forums. In addition, you could try to use QFocusEvent to check when the app loses/gains focus and then update menus accordingly. Sources Start a GUI process in Mac OS X without dock icon How to create a helper application (LSUIElement) that also has a (removable) dock icon Ho

Categories : Osx

Can I configure emacs to run a custom function when its dock icon is clicked?
For what it's worth, I came up with a workaround for this. Whenever the last GUI frame is closed and Emacs is not quitting, it creates a new hidden GUI frame. This makes sure that as long as Emacs is running, a GUI frame exists. Edit: Now an Emacs package: https://github.com/DarwinAwardWinner/osx-pseudo-daemon

Categories : Osx

Dock window in VB6
You could check out Developer Fusion Dockable Window Control. The screenshots look promising. From the overview: This control (only 44KB!) allows you to add a dockable window to your VB Project. Dock top, left, right or bottom 'Tear off' to undock form Autodock by moving form to edge of parent form 'Window memory' (the control remembers the dockable windows last position, which is restored when your application loads again.

Categories : Forms

What API can be used to hide OSX Dock when you drag a window towards it
Well, when the Dock is configured to (always) stay visible, the Window Manager will simply refuse to position the window directly under the Dock. It prevents users from putting stuff to where they can't reach. (Not every user is a power user; not every user knows the Dock can be hidden and since the Dock has no click-throughs...) The system will hide the Dock when the app goes fullscreen. But, again, the system takes care of it. Aside from directly mucking around with the user's Dock preferences (never change a user's preference for a third-party app behind their back!) like you mentionned; it can't be done legitematly. There's is no API to control the Dock... at best, you can only suggest a tile to represent your app when present on the Dock.

Categories : Objective C

Open app automatically at system startup in dock
Take a look at Daemons and Services Programming Guide. What you are looking for is an agent.

Categories : Osx

dock widget loaded from separate ui file to main window
You should not call QDockWidget::show. This forces it to act like an usual QWidget. Use QMainWindow::addDockWidget instead. def load_ui(ui_file, parent=None): loader = QUiLoader() file = QFile(ui_file) file.open(QFile.ReadOnly) myWidget = loader.load(file, None) file.close() return myWidget main_window = load_ui("ui/main_window.ui") dock_widget = load_ui("ui/console.ui", main_window) main_window.show() main_window.addDockWidget(Qt.LeftDockWidgetArea, dock_widget)

Categories : Python

Passing Data to an open window|Capture window open event
If you want a very simple way to do something after that window loads, you can listen to DOMContentLoaded event and then check if you are on the desired page, like so: window.addEventListener("DOMContentLoaded", function() { if (gBrowser.currentURI.spec.indexOf(URL_OF_SPECIFIC_WINDOW_YOU_WANT) != -1) { // Do your processing here } }, false); I'm doing the indexOf instead of == so you can put just some part of the page url in there and it will work.

Categories : Javascript

c# winforms dock fill tree-view make it disappear
The problem might be that you have added several items to the same parent control, and then when you fill the parent dock with one of them, the behaviour would not be what you expect. Use a splitcontainer. And when you want to fill out the dock, make sure your control belongs to two differnt panels of a splitcontainer. See this for an concrete example.

Categories : C#

Hide the icon of main window when navigate to another window
WPF Windows have a ShowInTaskbar property. Set this to false. You may also be interested in this post: C# WPF - Application Icon + ShowInTaskbar = False

Categories : C#

Console-window has icon, but OpenGL/GLUT window don't have. Why?
The only way to do this in a cross-platform way, if it matters that much to you, is to make your application not a console application. Make it a Windows application that creates a console. so your main window will be the OpenGL window, and the console window will be secondary. Creating a console window on Windows and hooking it up to standard in/out is not a trivial process, but it can be done.

Categories : C++

What is an alternative way to open a modal window instead of window.open?
You could use window.open to create a modal window, but it can get pretty messy. You would be better off using a modal plugin for the requirements you have. I would suggest using Bootstrap, I use this for all my modals. Easy as to implement and style. http://getbootstrap.com/2.3.2/javascript.html#modals To open another url in the modal, you could use an iframe in the modal to open up the url you need, something like this. http://bootply.com/61676

Categories : Jquery

Meteor callback on window.open(url) does not open window
Its likely this is being caught by chrome/safari's anti popup filter. You probably want to use the new window in a non malicious way, but modern browsers need user input to be able to open a new window. In a callback there isn't a user input 'trigger', so the browser might think its a popup/ad. There really isn't much of a way to get passed this. You could create a new button when the callback is run, then ask the user to click it to open a new window.

Categories : Javascript

Using Window.Open instead of Response.Redirect to open new window?
Use this class. ResponseHelper .Redirect("popup.aspx", "_blank", "menubar=0,width=100,height=100"); public static class ResponseHelper { public static void Redirect(string url, string target, string windowFeatures) { HttpContext context = HttpContext.Current; if ((String.IsNullOrEmpty(target) || target.Equals("_self", StringComparison.OrdinalIgnoreCase)) && String.IsNullOrEmpty(windowFeatures)) { context.Response.Redirect(url); } else { Page page = (Page)context.Handler; if (page == null) { throw new InvalidOperationException( "Cannot redirect to new window outside Page context."); } url = page.ResolveClientUrl(url); string script; if (!String.IsNullOrEmpty(win

Categories : C#

How to make my jlabel with icon look like desktop icon?
This is how you can do it, JLabel l=new JLabel("My Documents"); l.setIcon(new ImageIcon("mydocuments.png")); l.setHorizontalTextPosition(SwingConstants.CENTER); l.setVerticalTextPosition(SwingConstants.BOTTOM); l.addMouseListener(new MouseAdapter(){ public void mouseClicked(MouseEvent me) { if(me.getClickCount()==2) { try { Desktop.getDesktop().open(new File(System.getProperty("user.home")+"\My Documents")); }catch(Exception e){} } } });

Categories : Java

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

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

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

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

Close a tkinter progressbar window while matplotlib window is open
You are getting conflicting gui-main loops between the TK you are starting and the TK that plt is start. If you want to use matplotlib with your own gui, you must embed it your self and you can not import pyplot. All the behind the scenes magic that makes the pyplot interface wonderful is what is messing you up here. For a tutorial see here, for how mpl does the embedding see here. Also see: Unable to save matplotlib.figure Figure, canvas is None Python Matplotlib runtime error upon closing the console Matplotlib bar chart in a wx Frame instead of a new window

Categories : Python

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

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

Javascript window.open function to open all urls in a json feed
for(var i=0; i<len; i++) { links[i].addEventListener('click', function(e){ window.open(this.href, '_blank', 'location=yes'); e.preventDefault(); }); }

Categories : Javascript

Window.open in GWT not open correctly with in a call back function
The problem is popup blocker. When you click on a element you can open a new window since the browser considers it is a deliberate user action to open the window. Otherwise, the browser blocks any window.open in asynchronous blocks, because it considers that it could be malicious code run out of the user control. The best solution, is to open the file in an iframe, but you have to set the appropriate content-disposition header in server side which causes the browser to show the "Save" dialog. Client Code: // Create a new iframe final Frame f = new Frame(); f.setUrl(url_to_my_excel_file"); // Set a size of 0px unless you want the file be displayed in it // For .html images .pdf, etc. you must configure your servlet // to send the Content-Disposition header f.setSize("0

Categories : Java

Trying to open a file with Eclipe - eclipse.exe isn't added to the Open With: window
You should not use the .project file to start Eclipse. Start eclipse from the main start menu shortcut or eclipse.exe. Then select the workspace (browse to it) you want to work in (and that contains your project). If your project is not in a workspace, import it with the eclipse import menu.

Categories : Java

Jquery not to open popups in hover with window.open and mousenter
What are you trying to do is not possible, you are trying to bind 2 different events, however if you are going to click the mouse will have to hover it first, you can't avoid that, I suggest reevaluating your strategy, maybe adding a different link to trigger your pop up or changing classes and triggering different events depending on which class is hovered or clicked.

Categories : Jquery

window.open does not reuse existing named window?
In the Internet Zone (which is where your code runs when you use a fully-qualified-domain-name like servername.domain.com) your code has restricted permissions. In the Intranet Zone (which is where your code runs when you use a dotless hostname like servername) there are fewer restrictions on permissions. The problem you're encountering is that in the Internet Zone, a named window launched from site "A" may not be navigated by JavaScript from site "B"-- instead a new window is created. We introduced this change in IE8 for security reasons, and it matches other browsers and what HTML5 demands. See http://msdn.microsoft.com/en-us/library/dd565638(v=vs.85).aspx for more information.

Categories : Javascript

close window and open a new window titanium alloy
You define your window in XML, say mycoolwindow.xml. Then from some other part of your code: var win=Alloy.createController('mycoolwindow').getView(); win.open(); See example here: https://github.com/ricardoalcocer/AlloyOpenWindow or go to this link: http://www.youtube.com/watch?v=CB26lUj0UBQ

Categories : Javascript

Reset window.open specs in popup window
Specify scrollbars=1 and specify width and height, that way the scrollbars would show when the content is larger than the specified window width and height. window.open("...url...", "...blah...", "scrollbars=1,width=600,height=600")

Categories : Javascript

IE11 on WIN 8.1 : window.open with the same name is opening new popup window
Please try this.. this will check the window is still open or closed.. <script type="text/javascript"> var myWindow = null; if(!myWindow || (myWindow && myWindow.closed)){ myWindow = window.open("http://www.google.com", "test", "resizable=no,scrollbars=yes,width=260,height=225"); } else{ myWindow.location.href = 'http://www.google.com'; } </script>

Categories : Javascript

25 WPF Calendars in one window, takes 5 seconds to open Window
This will give you an idea of what a calendar is versus a button using Snoop. Yes, we do expect a lot of calendars to take a lot more rendering time. If you need to use a lot of them, I'd attempt to create your own that's simpler and/or virtualize them Heres a button, 3 children... And heres a Calendar, 522 children. Notice each of the CalendarButtons I didn't expand still have 9 children each

Categories : C#

How to open and grab a window over TopLevel window
We can do like this: sub AnotherWindow { $window_over_top_level =$new_wind->Toplevel(-title => "Window Over Top Level With Grab"); $window_over_top_level->geometry( "270x380"); $window_over_top_level->grab; }

Categories : Perl

Bookmarklet window gets blocked if I try to do anything besides open a new window
I assume that the difference is that i'm doing some parsing in the first example No, the problem is the asynchronous AJAX. The browser tries to determine if a user action initiated a new window or not before deciding to block it or not. For the new window to open without blocking, there must be a "direct line of action" between the user click and the window opening. The async AJAX breaks that direct line. (Synchronous AJAX might work, I'm not sure.) Is there a way to have my cake and eat it too? There is no perfect solution, but an improvement over what you have now is to create a pop-over div on the page with a link similar to <a href="http://localhost:3000/bmfeed?targ=..." target="_blank">click here to open the new window</a>.

Categories : Javascript

window.location vs window.open issue
Remove that extra ; window.open($(this).val()); Demo ---> http://jsfiddle.net/PqXWJ/21/show/

Categories : Javascript

window.open sends the current window to 0
You need to put it in an onclick event. You need to also add in return false; to stop the browser from following the link. <a href="#" onclick="window.open('someurl','_blank'); return false;">Link</a> jsFiddle of it working. Here's another, slightly cleaner way to do it: <a id="link" href="#">Link</a> <script type="text/javascript"> var link = document.getElementById("link"); link.onclick = function() { window.open('someurl','_blank'); return false; } </script> I don't know your scenario, but this is probably the ideal way to do it: <a target="_blank" href="someurl">Link</a> Clean and simple, and it does the exact same thing.

Categories : Javascript



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