473,322 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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_decorated(FALSE) but this also removes the border making the
window look quite strange.

Thanks,

Nick.

Jul 18 '05 #1
2 6509
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_decorated(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_request(100, 100)
w.set_decorated(False)
w.set_has_frame(False)
w.set_border_width(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
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...
0
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...
0
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...
6
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...
2
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...
6
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...
1
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 :...
0
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.