gtk.Entry Colors | Bytes (2024)

Home Posts Topics Members FAQ

Tuomas

I would like to manipulate PyGTK Entry widget's background and
foreground colors. Is it possible? How?

Tuomas

Sep 24 '06 #1

Subscribe Reply

4 gtk.Entry Colors | Bytes (1) 9132 gtk.Entry Colors | Bytes (2)

MonkeeSage

Tuomas wrote:

I would like to manipulate PyGTK Entry widget's background and
foreground colors. Is it possible? How?

Yes, it is possible:

# widget color
entry.modify_ba se(gtk.STATE_NO RMAL, gtk.gdk.color_p arse("#FF0000") )
# frame color
entry.modify_bg (gtk.STATE_NORM AL, gtk.gdk.color_p arse("#0000FF") )
# text color
entry.modify_te xt(gtk.STATE_NO RMAL, gtk.gdk.color_p arse("#00FF00") )

See:
http://www.pygtk.org/pygtk2reference...gtkwidget.html
http://www.pygtk.org/pygtk2reference...-gdkcolor.html

Regards,
Jordan

Sep 24 '06 #2

Tuomas

MonkeeSage wrote:

Tuomas wrote:
>>I would like to manipulate PyGTK Entry widget's background and
foreground colors. Is it possible? How?

Yes, it is possible:

# widget color
entry.modify_ba se(gtk.STATE_NO RMAL, gtk.gdk.color_p arse("#FF0000") )
# frame color
entry.modify_bg (gtk.STATE_NORM AL, gtk.gdk.color_p arse("#0000FF") )
# text color
entry.modify_te xt(gtk.STATE_NO RMAL, gtk.gdk.color_p arse("#00FF00") )

Thanks a lot.

See:
http://www.pygtk.org/pygtk2reference...gtkwidget.html
http://www.pygtk.org/pygtk2reference...-gdkcolor.html

Yes, I read the reference before posting here. I tried something like:

attr_list=pango .AttrList()
attr=pango.Attr Foreground(0, 0, 65000, start_index=0, end_index=-1)
attr_list.inser t(attr)
entry.get_layou t().set_attribu tes(attr_list)

or

entry.window.se t_background(gt k.gdk.color_par se("#0000FF"))

but they did not work for this purpose.

Tuomas

Regards,
Jordan

Sep 25 '06 #3

MonkeeSage

Tuomas wrote:

Yes, I read the reference before posting here. I tried something like:

Hi Tuomas,

I didn't mean to say that you hadn't read the docs (I had a hard time
finding the right methods in the docs too, even though I know the
methods); I just wanted to give you the references so you could see the
method signatures and the other gdk.Color options. :)

Regards,
Jordan

Sep 25 '06 #4

Tuomas

MonkeeSage wrote:

Tuomas wrote:
>>Yes, I read the reference before posting here. I tried something like:

Hi Tuomas,

I didn't mean to say that you hadn't read the docs (I had a hard time
finding the right methods in the docs too, even though I know the
methods); I just wanted to give you the references so you could see the
method signatures and the other gdk.Color options. :)

I didn't meant to blame you of blaming me either. I had worked with this
problem a couple of days and your advice helped me to solve it in ten
minutes. So I am very grateful.

Nice thing this Python :)

Tuomas

Regards,
Jordan

Sep 25 '06 #5

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

Similar topics

5 2507

alternate row colors - NOT in a DB

by: aznFETISH |last post by:

I have a list of links that I ue on my page, I alternate background colors for these links in a table, I usually do it using a DB but this list of link is manually added into the page so my question, is it possible to alternate the row colors automatic and have it created from a list of URL's?

PHP

5 2415

shouldn't [un]visited link colors be a browser issue?

by: Dan Jacobson |last post by:

What's Nielsen talking about in http://www.useit.com/alertbox/20040503.html http://www.useit.com/alertbox/20040510.html Can't a good browser keep track of visited vs. unvisited link colors? Is my site deficient as I have not messed with link colors? Does Nielsen address why all this can't be left up to the browser? Are link colors supposed to be special, like background images, to make a big impression?

HTML / CSS

3 3584

DIV with browser default colors?

by: Marc |last post by:

Hi, maybe you guys know something I don't know... Is it possible (and how) to achieve the following: 1) A <BODY> with specific background-color, say blue. 2) A <DIV class='main'> (which contains the main content text of the page) with no colors assigned at all.

HTML / CSS

6 6149

Anyone have a list of HTML colors in Hex, Long and Named format?

by: Danny Lesandrini |last post by:

I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but my mappings between named colors, HEX values and the Long Integer values used in Access are not jibbing. Anyone have a nice list laying around? Danny J Lesandrini dlesandrini@hotmail.com

Microsoft Access / VBA

6 2245

display all colors

by: Mark |last post by:

Is there a programatic way to iterate through all the named colors? Something like: HtmlTable ht = new HtmlTable(); HtmlTableRow htr; HtmlTableCell htc; foreach (Color c in ) //I CAN'T FIND COLLECTION OF ALL COLORS { htr = new HtmlTableRow();

ASP.NET

11 2248

Colors

by: Paul Smith |last post by:

I have a button on my web page the backcolor of which I want to change: btnSample.backcolor = ???????? I want the color to be Gainsboro However I enter Gainsboro or color.Gainsboro I have the blue wavy line indicating an error. Help!

ASP.NET

4 5476

How to display comments for each enum entry?

by: NewAlias |last post by:

How to display comments for each enum entry? 'Enum example with commnents commented Private Enum MyEnum YourName =1 ' Set this to get your real name YourAge=2 ' Set this to get your real age YourNationality=3 ' Set this to retrieve your real nationality End Enum

Visual Basic .NET

5 25015

ComboBox Blank Entry

by: Steve B. |last post by:

Without adding whitespace to the ComboBox datasource is there a way I can add a blank entry or, a reset entry, to the ComboBox dropdown Thanks Steve

C# / C Sharp

1 1871

Setting Colors in Base Form to be used by Child Forms

by: Demi |last post by:

I want to be able to define standard colors in a base form, then have child forms use those values instead of standard colors. Ex in my base form I want to do this: Color myColor = System.Drawing.SystemColors.Control; Then in my child form in the designer, I want to be able to enter "myColor" in the BackColor property.

C# / C Sharp

8530

What is ONU?

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...

General

8457

Changing the language in Windows 10

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,...

Windows Server

8879

Maximizing Business Potential: The Nexus of Website Design and Digital Marketing

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...

Online Marketing

7518

AI Job Threat for Devs

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...

Career Advice

1 6385

Access Europe - Using VBA to create a class based on a table - Wed 1 May

by: isladogs |last post by:

The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...

Microsoft Access / VBA

4269

Trying to create a lan-to-lan vpn between two differents networks

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...

Networking - Hardware / Configuration

1 2885

transfer the data from one system to another through ip address

by: 6302768590 |last post by:

Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

C# / C Sharp

2 2135

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

3 1876

Comprehensive Guide to Website Development in Toronto: Expert Insights from BSMN Consultancy

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...

General

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

To disable or enable advertisem*nts and analytics tracking please visit the page.

gtk.Entry Colors | Bytes (2024)

References

Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 6429

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.