titlebar

How to Change Color of NSWindow Title Bar in OSX

孤人 提交于 2019-11-27 10:23:21
问题 After a Long search regarding the NSWindow title bar color and title color, i have found a easy drawing solution. I posting this to share my knowledge. 回答1: Sub class a NSView with name MyTitleView and add the following code - (void)drawString:(NSString *)string inRect:(NSRect)rect { static NSDictionary *att = nil; if (!att) { NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [style setLineBreakMode:NSLineBreakByTruncatingTail]; [style setAlignment

WinAPI: Create resizable window without title bar, but with minimize/maximize/close buttons (as Firefox/Chrome/Opera)

邮差的信 提交于 2019-11-27 10:09:49
问题 If you look at the windows of the browsers Firefox, Chrome or Opera, you'll notice that their windows have minimize/maximize/close buttons are resizable but have no title bar I'm interested: how can I create such a window? What I have already tried: I looked around on StackOverflow (and googled, too), and found this: opening a window that has no title bar with win32 Unluckily, this didn't help completely: The first step was to extend the solution proposed on opening a window that has no title

How can I use NSVisualEffectView in window's title bar?

≯℡__Kan透↙ 提交于 2019-11-27 09:47:45
问题 In OS X Yosemite, Apple introduced a new class NSVisualEffectView . Currently, this class is undocumented, but we can use it in Interface Builder. How can I use NSVisualEffectView in the window's title bar? Here's example: in Safari, when you scroll, the content appears under the toolbar and titlebar with a vibrance and blur effect. 回答1: @sgonzalez's answer forced me to explore NSWindow.h file where i found titlebarAppearsTransparent property. So we get: class BluredWindow: NSWindow {

Visually remove/disable close button from title bar .NET

和自甴很熟 提交于 2019-11-27 06:48:11
问题 I have been asked to remove or disable the close button from our VB .NET 2005 MDI application. There are no native properties on a form that allow you to grey out the close button so the user cannot close it, and I do not remember seeing anything in the form class that will allow me to do this. Is there perhaps an API call or some magical property to set or function to call in .NET 2005 or later to do this? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ More information: I need to maintain the minimize

How to change the title of a browser page which a servlet streamed a PDF to?

跟風遠走 提交于 2019-11-27 05:47:23
问题 My Java based webapp has a servlet which streams PDF content back to the browser based on request parameter. e.g. user clicks on an A tag with an href of "myApp/FetchPDFServlet?id=123". Servlet mapping picks up request, streams PDF data to response as mime-type application/pdf, closes flushes buffers. However the browser title bar for the page displaying the PDF reads "FetchPDFServlet?id=123" How can I change the title the browser displays for the page that displays the PDF? So the browser

How to remove title bar in JFrame

喜欢而已 提交于 2019-11-27 04:37:02
I'm using the following code for practising, http://docs.oracle.com/javase/tutorial/uiswing/examples/layout/BorderLayoutDemoProject/src/layout/BorderLayoutDemo.java I also add frame.setSize(frame.getMaximumSize()); in createAndShowGUI() method, What is more I want this window not to have the title bar, close and minimize buttons. I tried the following code, frame.setUndecorated(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); If I added this code before the pack(), it goes into infine loop with this exception Exception in thread "AWT-EventQueue-0" java.lang

How can I remove just the Maximize button from a JFrame?

馋奶兔 提交于 2019-11-27 04:27:12
问题 I have a JFrame and want to remove the maximize button from that. I wrote the code below, but it removed maximize, minimize, and close from my JFrame . JFrame frame = new JFrame(); frame.add(kart); frame.setUndecorated(true); frame.setVisible(true); frame.setSize(400, 400); I want to only remove the maximize button from the JFrame . 回答1: Make it not resizable: frame.setResizable(false); You will still have the minimize and close buttons. 回答2: You can't remove the button from a JFrame . Use a

How to draw custom button in Window Titlebar with Windows Forms?

↘锁芯ラ 提交于 2019-11-27 04:18:23
How do you draw a custom button next to the minimize, maximize and close buttons within the Titlebar of the Form? I know you need to use Win32 API calls and override the WndProc procedure, but I haven't been able to figure out a solution that works right. Does anyone know how to do this? More specifically, does anyone know a way to do this that works in Vista? Matthew Scharley The following will work in XP, I have no Vista machine handy to test it, but I think your issues are steming from an incorrect hWnd somehow. Anyway, on with the poorly commented code. // The state of our little button

How can I customize the title bar on JFrame?

拜拜、爱过 提交于 2019-11-27 01:37:58
I would like to have a customized title bar in my Java Swing desktop application. What is the best way to do that? I can use a "Swing-title bar" by using the following code in the constructor for my JFrame: this.setUndecorated(true); this.getRootPane().setWindowDecorationStyle(JRootPane.FRAME); But how do I customize it? Is there any UI delegates that I can override or do I have to implement my own title bar from scratch? I want something like Lawson Smart Office: Kirill You can see an example in Substance look-and-feel ( mirrored source ). Search the code for SubstanceRootPaneUI and

Changing WPF title bar background color

一曲冷凌霜 提交于 2019-11-27 01:17:24
I have a WPF Windows application. I need to change the background color of the title bar. How can I do that? Marcel B In WPF the titlebar is part of the non-client area, which can't be modified through the WPF window class. You need to manipulate the Win32 handles (if I remember correctly). This article could be helpful for you: Custom Window Chrome in WPF . Sushant Khurana Here's an example on how to achieve this: <Grid DockPanel.Dock="Right" HorizontalAlignment="Right"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center"> <Button x:Name="MinimizeButton