titlebar

Changing the color of the title bar in WinForm

浪尽此生 提交于 2019-11-27 00:35:23
问题 Is it possible to change the color of the title bar of a WinForm in C#? __________________________ [Form1_______________-|[]|X] <- I want to change the color of this | | | | | | |__________________________| 回答1: I solved this problem. This is the code: [DllImport("User32.dll", CharSet = CharSet.Auto)] public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); [DllImport("User32.dll")] private static extern IntPtr GetWindowDC(IntPtr hWnd); protected override void WndProc(ref Message m) {

Custom title with image

╄→尐↘猪︶ㄣ 提交于 2019-11-27 00:18:29
i'm creating custom title for activity by disabling standard one and managing everything myself. I wonder if it's possible to replace/theme standart title to my needs. I can customize size, background image, and text via themes by changing windowXYZStyle items. The only thing i couldn't find - how i can add image instead of text. I've tried requestWindowFeature(Window.FEATURE_CUSTOM_TITLE) and assign custom layout - but it doesn't seems to work. EDIT : Here is a report of testing suggestions, code is below - result - image view is not showing up. Activity public class SettingsActivity extends

Android: The progress bar in the window's title does not display

假如想象 提交于 2019-11-27 00:03:55
问题 I have a web view to override the built-in browser and I want to show a progress indicator on the title bar. This is the code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.browser); currentURL = BrowserActivity.this.getIntent().getExtras().getString("currentURL"); try { mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true)

Android: Custom Title Bar

浪尽此生 提交于 2019-11-26 22:25:30
I have a custom title bar requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.activities); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); Which works basically fine. The problem is that until the above code is called the default title bar is shown. I don't want a title bar there at all, in other words before mine shows up no title shall show up. Adding this to the manifest: <application android:theme="@android:style/Theme.NoTitleBar"> leads to a force close. My manifest looks like this <application android:icon="@drawable/icon" android

How to customize title bar and window of desktop application

天大地大妈咪最大 提交于 2019-11-26 20:14:25
How could I customize the Title Bar (including: close, maximize, minimize buttons, title) and the Frame of desktop application written in PyQt so that it looks like the below image?. I need a way to specify the colors I want to use for title bar elements (buttons, text title and background-color of bar and buttons). the code which I need to change its window: import sys from PyQt5 import QtCore, uic from PyQt5.QtWidgets import QApplication, QDialog class MainWindow(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) self.setWindowFlags(QtCore.Qt.FramelessWindowHint) self

Android - Back button in the title bar

∥☆過路亽.° 提交于 2019-11-26 18:54:43
问题 In many apps (Calendar, Drive, Play Store) when you tap a button and enter a new activity, the icon in the title bar turns into a back button, but for the app I am making, it doesn't do that. How do I make that icon take you back to the previous screen? 回答1: There are two simple steps to create a back button in the title bar: First, make the application icon clickable using the following code in the activity whose title bar you want to have a back button in: ActionBar actionBar = getActionBar

how can i change the color of titlebar in JFrame?

折月煮酒 提交于 2019-11-26 17:54:59
I am using the following code, UIManager.put("JFrame.activeTitleBackground", Color.red); for change the toolbar color in JFrame. But it didn't work. Is it possible to change the color of titlebar in JFrame? Its not possible. The top level JFrame is controlled by the look & feel of the underlying OS. You CAN change the color of an InternalFrame . //source : javax/swing/plaf/metal/MetalTitlePane.java import javax.swing.*; import javax.swing.plaf.*; import javax.swing.plaf.metal.*; public class TitleColor { public static void main_helper (String args[]) { JFrame f = new JFrame (); f

How do you change the text in the Titlebar in Windows Forms?

我的未来我决定 提交于 2019-11-26 16:10:59
问题 I am trying to set a condition that would change the writing inside the title bar... But how do I change the title bar text? 回答1: You can change the text in the titlebar in Windows Forms by using the Text property. For C# // This class is added to the namespace containing the Form1 class. class MainApplication { public static void Main() { // Instantiate a new instance of Form1. Form1 f1 = new Form1(); // Display a messagebox. This shows the application // is running, yet there is nothing

Android activity as dialog, but without a title bar

感情迁移 提交于 2019-11-26 15:57:21
问题 I have an activity that has the following set as theme: android:theme="@android:style/Theme.Dialog" However, there is a title bar in the activity-dialog that appears, that uses up the little available space that I have. How can I remove it? 回答1: Try doing requestWindowFeature(Window.FEATURE_NO_TITLE); in onCreate . It'll need to be done immediately after calling super.onCreate and just before setContentView . 回答2: For those who are using AppCompatActivity , above answers may not work. Try

Remove Android App Title Bar

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 15:47:26
问题 I understand that these properties in the manifest: android:theme="@android:style/Theme.NoTitleBar" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" can remove the title bar. However, I constantly check the Graphical Layout when I am modifying my app. When I look at the Graphical Layout I still see the title bar. I want to remove the title bar in a way that I don't have to see it during the development of the game. 回答1: In the Design Tab, click on the AppTheme Button Choose the