1# gui_errstr.py 2# 3# Error display string 4# 5# Author: MontaVista Software, Inc. 6# Corey Minyard <minyard@mvista.com> 7# source@mvista.com 8# 9# Copyright 2006 MontaVista Software Inc. 10# 11# This program is free software; you can redistribute it and/or 12# modify it under the terms of the GNU Lesser General Public License 13# as published by the Free Software Foundation; either version 2 of 14# the License, or (at your option) any later version. 15# 16# 17# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 18# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 23# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 25# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 26# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27# 28# You should have received a copy of the GNU Lesser General Public 29# License along with this program; if not, write to the Free 30# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 31# 32 33try: 34 import Tix 35except: 36 import tkinter 37 from tkinter import tix as Tix 38 39class ErrStr(Tix.Label): 40 def __init__(self, parent): 41 Tix.Label.__init__(self, parent, relief="ridge", bd=5) 42 return 43 44 def SetError(self, text): 45 self.config(text=text) 46 return 47 48 pass 49