×
Namespaces

Variants
Actions

Python Hildon Widgets - Part 2

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.


Article Metadata
Article
Created: User:Raulherbster (02 May 2008)
Last edited: lpvalente (21 Apr 2013)

hildon.Note

Notes are used to ask a confirmation (Ok/Cancel/etc.) from the user. The following code shows a confirmation note and changes the button label based on user's response.

A hildon.Note

def button_callback(widget, button, window):
  dialog = hildon.Note ("confirmation", (window, "Are you sure?", gtk.STOCK_DIALOG_WARNING) )
  dialog.set_button_texts ("Yes", "No")
  response = dialog.run()
  dialog.destroy()

  if response == gtk.RESPONSE_OK:
      button.set_label("Confirmed")
  else:
      button.set_label("Canceled")

hildon.SetPasswordDialog

Dialog used to receive a new password from user.

A hildon.SetPasswordDialog

def button_callback(widget, button, window):
  passwordDialog = hildon.SetPasswordDialog(window, False)
  response = passwordDialog.run()
  passwordDialog.hide()       
  passwordDialog.destroy()

hildon.TimePicker

It is a dialog popup widget which lets the user set a time.

A hildon.SetPassworDialog

def button_callback(widget, button, window):
  time_picker = hildon.TimePicker(window)
  response = time_picker.run()
  time_picker.hide()
This page was last modified on 21 April 2013, at 01:47.
80 page views in the last 30 days.
×