473,796 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pygtk: How to remove title bar from a window

Hi all,

I am writing an application using pyGTK that has several pop-up dialogs
that show and hide in succession. I would like to prevent the user
from closing the dialog and if possible I'd like to use a "title
bar-less" window with a normal border so the X is not even available to
click. Is this possible? I have tried using
window.set_deco rated(FALSE) but this also removes the border making the
window look quite strange.

Thanks,

Nick.

Jul 18 '05 #1
2 6651
Nick Atkins wrote:
Hi all,

I am writing an application using pyGTK that has several pop-up dialogs
that show and hide in succession. I would like to prevent the user
from closing the dialog and if possible I'd like to use a "title
bar-less" window with a normal border so the X is not even available to
click. Is this possible? I have tried using
window.set_deco rated(FALSE) but this also removes the border making the
window look quite strange.


Draw your own border then. And don't rely on the user not beeing able to
close the window - xkill is at hand, and even if the average user doesn't
know about it - it _will_ be used.
--
Regards,

Diez B. Roggisch
Jul 18 '05 #2
Thanks for the reply Diez.

I'm not sure I can draw a border on its own with pyGTK but admittedly I
am not yet an expert. I have the following minimal test program which
opens a window and I cannot get it to draw a window with no title bar,
just a border:

#!/usr/bin/env python
import pygtk
pygtk.require(' 2.0')
import gtk

if __name__ == "__main__":
# create a popup
w = gtk.Window()
w.set_size_requ est(100, 100)
w.set_decorated (False)
w.set_has_frame (False)
w.set_border_wi dth(10)
w.show()
gtk.main()

I tried removing the set_decorated and set_has_frame lines and changing
them to True but I either get a complete title-bar window or nothing at
all.

Any ideas? Thanks.

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3357
by: Samuele Giovanni Tonon | last post by:
hi, i'm trying to develop a trivial application which random copy files from a directory to another one. i made it using pygtk for the graphical interface, however i find some problem with progressbar and ListStore: basically i need to make pulse the progressbar while i'm copying files and write filenames copied on the ListStore on to the window.
0
1332
by: Michele Simionato | last post by:
I am in the process of learning pygtk and I would like to port some custom made Tkinter widgets to pygtk, just an exercise. For instance I have this code: .. from Tkinter import * .. .. class AnimatedLabel(Label): .. def __init__(self, master, text, width=72, maxspc=16, deltat=100, **kw): .. self.text = text
0
1365
by: Johan | last post by:
Hello! I'm trying to figure out how to use PYGTK to implement a rudimentary UI: I want to have an Image as the background, and then be able to put buttons (eventually icons, but buttons for now) The PyGTK FAQ (pygtk.org) has some suggestions, but they have failed to clear up the issue. Using their suggestions as a starting point, I've arrived at the below. However, it fails in that I can't seem to
6
1596
by: sapo | last post by:
Hi all, i ve started learning pygtk with glade, i m just making some test stuff. but i got some problems with simple things. I designed 2 windows on glade, then exported it and loaded in the python script, the second window is hidden by default, then i wrote a function to show it up, ok it shows, them i wrote another function to hide it.. ok it hides... But in the second time i show the window.. the window appear EMPTY, with just the...
2
2570
by: Tim N. van der Leeuw | last post by:
I tried to create a windows executable of a pygtk program. My first attempt worked, kinda, except that no themes were applied and no readable fonts were found by pango; so all letters where just empty squares. But the program worked. I looked up some docs, found the following recipe on the PyGTK Wiki site: http://starship.python.net/crew/theller/moin.cgi/Py2exeAndPyGTK I followed those instructions to convert my setup.py file;...
6
2869
by: seb | last post by:
Hi, I am using pygtk for the first times. I am wondering what would be the best "pattern" to interface pygtk with a thread. The thread is collecting informations (over the network for example) or is doing some long calculations.
1
1585
by: manatlan | last post by:
I was a fan of "SimpleGladeApp/tepache way" to build a pygtk app. I've build a new efficient/dynamic way to build a pygtk app ... Here is an example : ================================================= class Fen(GladeApp): """ Window win .title="Hello" @delete_event
0
1787
by: Michael Palmer | last post by:
On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@gmail.comwrote: I haven't tried it myself, but I came across a blog post the other day that describes a way of building windows installers for pyGTK applications at http://unpythonic.blogspot.com/2007/07/pygtk-py2exe-and-inno-setup-for-single.html
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.