Timothy Lawman
Timothy Lawman

Reputation: 2312

Python Pmw EntryField background colour properties

I have a GUI using the Pmw library and the background of the root is blue. When the widget is placed on the blue background the grey original colour of the widget shows over the blue background. I managed to remove this by changing label_bg property of the label part of the EntryField but not the Entry box part to the right of the label.

self.StudentID=Pmw.EntryField(self.StudentTab, label_font=("verdana", 12, "bold"),
                              labelpos="w", label_text="Student ID",
                              entry_width=3, label_bg="blue", label_fg="yellow",
                              entry_bg="blue",
                              validate={"validator":"real", "min":1, "max":150 })
                              #validation for the student id (bigger than 1
                              #and smaller than 150)
    self.StudentID.grid(row=1, column=0, sticky="w", padx=30, pady=10)

You can see in the code above a sample of the code for a typical EntryField. The label_bg="blue" changes the background of the label part of the component.

  1. Either: how do I access the full list of attributes in an EntryField?

  2. Or: Does anyone know the equivalent attribute for the textbox colour?

  3. I have tried entry_bg="Blue" but although this did not give an error it did not change anything.

  4. Could it be I need to change the background colour of the hull component, if so how?

Upvotes: 1

Views: 247

Answers (1)

Timothy Lawman
Timothy Lawman

Reputation: 2312

Well, it was the last option which was to change the hull_background property. It seems that by trial and error it was the only option left and seems to solve it.

Upvotes: 1

Related Questions