Try the HTML5 <input type="range">.  On some current browsers, it'll
just appear as a text field, although you can supplement it with
javascript.  Moving forwards, as more browsers support HTML5 forms,
it'll appear as a slider widget.  See [1].

[1]http://diveintohtml5.org/forms.html#type-range


On Oct 26, 7:17 am, jimgardener <[email protected]> wrote:
> is it possible to use the sliderlike Scale widget from tkinter in
> django?I am coding a web app where I need to get a numerical value
> entered by the user.I thought ,instead of asking the user to enter a
> value in a textfield ,I would provide a slider which he can move
> between the minimum and maximum values.
> Originally I designed the model and form like this
>
> class MyModel(django.models.Model):
>     user_enrty=models.IntegerField()
>
> class  MyModelForm(django.forms.ModelForm):
>     class Meta:
>         model=MyModel
>
> In tkinter ,I can create a scale widget like
> master = Tk()
> w = Scale(master, from_=0, to=100)
> w.pack()
> and get the current position using w.get()
>
> How can I use this in django?Can I directly put the tkinter widget in
> my model like ,
> class MyModel(django.models.Model):
>     user_enrty=tkinter.Scale(...)
>
> Any help would be greatly appreciated
> thanks
> jim

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to