¡@

Home 

python Programming Glossary: widget

In a django form, How to make a field readonly (or disabled) so that it cannot be edited?

http://stackoverflow.com/questions/324477/in-a-django-form-how-to-make-a-field-readonly-or-disabled-so-that-it-cannot-b

share improve this question To disable entry on the widget and prevent malicious POST hacks you must scrub the input in.. None if instance and instance.pk self.fields 'sku' .widget.attrs 'readonly' True def clean_sku self instance getattr self..

How to bind self events in Tkinter Text widget after it will binded by Text widget?

http://stackoverflow.com/questions/3501849/how-to-bind-self-events-in-tkinter-text-widget-after-it-will-binded-by-text-widg

to bind self events in Tkinter Text widget after it will binded by Text widget So I want to bind self.. events in Tkinter Text widget after it will binded by Text widget So I want to bind self events after Text widget bind it and.. by Text widget So I want to bind self events after Text widget bind it and change text in widget. Usual 'bind' is called before..

Using Django time/date widgets in custom form

http://stackoverflow.com/questions/38601/using-django-time-date-widgets-in-custom-form

Django time date widgets in custom form How can I use the nifty JavaScript date and.. form How can I use the nifty JavaScript date and time widgets that the default admin uses with my custom view I have looked.. documentation and it briefly mentions django.contrib.admin.widgets but I don't know how to use it Here is my template that I want..

Python/Tkinter: Interactively validating Entry widget content

http://stackoverflow.com/questions/4140437/python-tkinter-interactively-validating-entry-widget-content

Tkinter Interactively validating Entry widget content What is the recommended technique for interactively.. for interactively validating content in a Tkinter Entry widget I've read the posts about using validate True and validatecommand.. cleared if the validatecommand command updates the Entry widget's value. Given this behavior should we bind on the KeyPress..

What is the best real time plotting widget for wxPython?

http://stackoverflow.com/questions/457246/what-is-the-best-real-time-plotting-widget-for-wxpython

is the best real time plotting widget for wxPython I would like to show a read time graph with one.. up to 50 samples per second using Python and wxPython. The widget should support both Win32 and Linux platforms. Any hints are.. is is particularly easy to use. python wxpython wxwidgets share improve this question Here's a sample of a dynamic..

Is there a matplotlib equivalent of MATLAB's datacursormode?

http://stackoverflow.com/questions/4652439/is-there-a-matplotlib-equivalent-of-matlabs-datacursormode

import cbook class DataCursor object A simple data cursor widget that displays the x y location of a matplotlib artist when it..

Django Passing Custom Form Parameters to Formset

http://stackoverflow.com/questions/622982/django-passing-custom-form-parameters-to-formset

ServiceOption.objects.none rate forms.DecimalField widget custom_widgets.SmallField units forms.IntegerField min_value.. rate forms.DecimalField widget custom_widgets.SmallField units forms.IntegerField min_value 1 widget custom_widgets.SmallField.. units forms.IntegerField min_value 1 widget custom_widgets.SmallField def __init__ self args kwargs affiliate..

Howto embed a video via mpylayer into a QWidget frame?

http://stackoverflow.com/questions/11051534/howto-embed-a-video-via-mpylayer-into-a-qwidget-frame

embed a video via mpylayer into a QWidget frame Is it possible in PyQt4 to embed a video via mpylayer.. it possible in PyQt4 to embed a video via mpylayer into a QWidget or into a subclass of it . If so could you provide a minimal.. improve this question For a complete example of a Qt Widget that embeds MPlayer try qmpwidget . But here's a minimal PyQt..

PySide Qt: Auto vertical growth for TextEdit Widget, and spacing between widgets in a vertical layout

http://stackoverflow.com/questions/11677499/pyside-qt-auto-vertical-growth-for-textedit-widget-and-spacing-between-widgets

Qt Auto vertical growth for TextEdit Widget and spacing between widgets in a vertical layout I need to.. that populates the widgets is as follows self._body_frame QWidget self._body_frame.setMinimumWidth 750 self._body_layout QVBoxLayout.. for i in range self._posts_per_page pw PostWidget self._post_widgets.append pw self._body_layout.addWidget pw..

A QWidget like QTextEdit that wraps its height automatically to its contents?

http://stackoverflow.com/questions/11851020/a-qwidget-like-qtextedit-that-wraps-its-height-automatically-to-its-contents

QWidget like QTextEdit that wraps its height automatically to its contents.. changes PySide Qt Auto vertical growth for TextEdit Widget I am answering instead of marking a duplicate as I suspect its.. 10 self.scroll QtGui.QScrollArea self.scroll.setWidgetResizable True self.scroll.setVerticalScrollBarPolicy QtCore.Qt.ScrollBarAlwaysOn..

How do I change the color of my widget in Kivy at run time?

http://stackoverflow.com/questions/12997545/how-do-i-change-the-color-of-my-widget-in-kivy-at-run-time

to variables in the widget class. # kivy 1.4.1 CircleWidget canvas Color rgba self.r 1 1 1 Ellipse pos self.pos size self.size.. from kivy.lang import Builder from kivy.uix.widget import Widget Builder.load_file 'circletest.kv' class CircleWidget Widget.. Widget Builder.load_file 'circletest.kv' class CircleWidget Widget def __init__ s kwargs s.size 50 50 s.pos 100 50 s.r 0..

How do I override delete() on a model and have it still work with related deletes

http://stackoverflow.com/questions/1534986/how-do-i-override-delete-on-a-model-and-have-it-still-work-with-related-delete

deletes I'm having a problem because I'm deleting a Widget by using some_widget_instance.delete . I also have a model called.. some_widget_instance.delete . I also have a model called WidgetFile with an override delete method so that I can delete files.. method so that I can delete files off my hard drive when a WidgetFile is deleted. The problem I'm having is that if I delete a..

PyQt - Column of Checkboxes in a QTableView

http://stackoverflow.com/questions/17748546/pyqt-column-of-checkboxes-in-a-qtableview

value if __name__ __main__ from sys import argv exit class Widget QtGui.QWidget A simple test widget to contain and own the model.. __main__ from sys import argv exit class Widget QtGui.QWidget A simple test widget to contain and own the model and table... the model and table. def __init__ self parent None QtGui.QWidget.__init__ self parent l QtGui.QVBoxLayout self cdf self.get_data_frame..

Django MultiWidget Phone Number Field

http://stackoverflow.com/questions/1777435/django-multiwidget-phone-number-field

MultiWidget Phone Number Field I want to create a field for phone number.. 'NoneType' object is unsubscriptable class PhoneNumberWidget forms.MultiWidget def __init__ self attrs None wigs forms.TextInput.. is unsubscriptable class PhoneNumberWidget forms.MultiWidget def __init__ self attrs None wigs forms.TextInput attrs 'size'..

Python: Why is IDLE so slow?

http://stackoverflow.com/questions/2212722/python-why-is-idle-so-slow

low level TK stuff in the past and i know that the TkText Widget is keeping the text in a BTree structure. Appending text a character..

Django admin - How can I add the green plus sign for Many-to-many Field in custom admin form

http://stackoverflow.com/questions/3692822/django-admin-how-can-i-add-the-green-plus-sign-for-many-to-many-field-in-custo

plus sign appear. However in order to use a custom Field Widget I need to figure this out. class GalleryForm ModelForm photos.. it seems like I have to wrap my widget in a RelatedFieldWidgetWrapper but I haven't quite gotten my head around it. Any help.. your widget with django.contrib.admin.widgets.RelatedFieldWidgetWrapper which turns out to be a bit complicated since it expects..

Django: How to build a custom form widget?

http://stackoverflow.com/questions/4707192/django-how-to-build-a-custom-form-widget

the default widgets with Select if any . Subclass from Widget and if you find any common pattern with builtins you can still..

Giving parameters into TestCase from Suite in python

http://stackoverflow.com/questions/5336626/giving-parameters-into-testcase-from-suite-in-python

library unittest.html import unittest class WidgetTestCase unittest.TestCase def setUp self self.widget Widget.. unittest.TestCase def setUp self self.widget Widget 'The widget' def tearDown self self.widget.dispose self.widget.. testcase def suite suite unittest.TestSuite suite.addTest WidgetTestCase 'test_default_size' suite.addTest WidgetTestCase 'test_resize'..