How to use the etk.Entry function in etk

To help you get started, we’ve selected a few etk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drf / amsn2 / amsn2 / gui / efl.py View on Github external
self._amsn_core = amsn_core
        self._amsn_gui = self._amsn_core.gui
        self._evas = self._amsn_gui._evas

        try:
            self._edje = edje.Edje(self._evas.evas, file=THEME_FILE,
                                group="login_screen")
        except edje.EdjeLoadError, e:
            raise SystemExit("error loading %s: %s" % (THEME_FILE, e))

        self._edje.size = self._evas.size
        self._evas.data["login_window"] = self._edje
        
        self._edje.on_key_down_add(self.__on_key_down)

        self.password = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.password)
        embed.show_all()
        self.password.password_mode = True
        self._edje.part_swallow("login_screen.password", embed.object)

        self.status = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.status)
        embed.show_all()
        self._edje.part_swallow("login_screen.status", embed.object)

        self.username = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.username)
        embed.show_all()
github drf / amsn2 / amsn2 / gui / efl.py View on Github external
except edje.EdjeLoadError, e:
            raise SystemExit("error loading %s: %s" % (THEME_FILE, e))

        self._edje.size = self._evas.size
        self._evas.data["login_window"] = self._edje
        
        self._edje.on_key_down_add(self.__on_key_down)

        self.password = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.password)
        embed.show_all()
        self.password.password_mode = True
        self._edje.part_swallow("login_screen.password", embed.object)

        self.status = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.status)
        embed.show_all()
        self._edje.part_swallow("login_screen.status", embed.object)

        self.username = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.username)
        embed.show_all()
        self._edje.part_swallow("login_screen.username", embed.object)
        
        if self._edje.part_exists("login_screen.signin"):
           self.signin = etk.Button()
           embed = etk.Embed(self._evas.evas)
           embed.add(self.signin)
           embed.show_all()
github kakaroto / e17 / OLD / BINDINGS / python / python-etk / examples / 06-embed / 06-embed.py View on Github external
ecore_evas.show()
edj.show()

embed1 = etk.Embed(ecore_evas.evas)
entry1 = etk.ComboboxEntry()
embed1.add(entry1)
embed1.show_all()
embed1.pointer_method_set(set_pointer, ecore_evas)
embed1.position_method_set(get_position, ecore_evas)

entry1.item_append("First item")
entry1.item_append("2 item")
entry1.item_append("last item")

embed2 = etk.Embed(ecore_evas.evas)
entry2 = etk.Entry()
entry2.password_mode = True
embed2.add(entry2)
embed2.show_all()

embed2.pointer_method_set(set_pointer, ecore_evas)

edj.part_swallow("entry1", embed1.object)
edj.part_swallow("entry2", embed2.object)

edj.focus = True


def text_changed(o):
    print "Text changed : %s - %s" % (o, o.text)
    return True
entry1.entry.connect("text-changed", text_changed)
github kakaroto / e17 / OLD / BINDINGS / python / python-etk / examples / 20-notebook.py View on Github external
import etk

##################################
## Create Widget for the first tab
image = etk.Image()
image.set_from_stock (etk.c_etk.StockEnums.APPLICATIONS_DEVELOPMENT, etk.c_etk.StockEnums.BIG)

buttons = [etk.Button(), etk.CheckButton(), etk.CheckButton()]
buttons[0].set_from_stock (etk.c_etk.StockEnums.DOCUMENT_OPEN)

labels = [etk.Label(text="App Name"), etk.Label(text="Generic Info"),
		etk.Label(text="Comments"), etk.Label(text="Executable"),
		etk.Label(text="Window Name"),etk.Label(text="Window Class"),
		etk.Label(text="Startup Notify"),etk.Label(text="Wait Exit")]

entries = [etk.Entry() for i in range(6)]

table = etk.Table(cols=2, rows=10, homogeneous=etk.Table.NOT_HOMOGENEOUS)
table.attach(image, 0, 0, 0, 0, etk.Table.NONE, 0, 0)
table.attach(buttons[0], 1, 1, 0, 0, etk.Table.HEXPAND, 0, 0)

for i in range(6):
	table.attach(labels[i], 0, 0, 2 + i, 2 + i, etk.Table.HFILL, 0, 0)
	table.attach_default(entries[i], 1, 1, 2 + i, 2 + i)

table.attach(labels[6], 0, 0, 8, 8, etk.Table.HFILL, 0, 0)
table.attach_default(buttons[1], 1, 1, 8, 8)
table.attach(labels[7], 0, 0, 9, 9, etk.Table.HFILL, 0, 0)
table.attach_default(buttons[2], 1, 1, 9, 9)

###################################
## Create Widget for the second tab
github drf / amsn2 / amsn2 / gui / efl.py View on Github external
self._edje.on_key_down_add(self.__on_key_down)

        self.password = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.password)
        embed.show_all()
        self.password.password_mode = True
        self._edje.part_swallow("login_screen.password", embed.object)

        self.status = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.status)
        embed.show_all()
        self._edje.part_swallow("login_screen.status", embed.object)

        self.username = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.username)
        embed.show_all()
        self._edje.part_swallow("login_screen.username", embed.object)
        
        if self._edje.part_exists("login_screen.signin"):
           self.signin = etk.Button()
           embed = etk.Embed(self._evas.evas)
           embed.add(self.signin)
           embed.show_all()
           self._edje.part_swallow("login_screen.signin", embed.object)
           self.signin.label = "Sign in"
           self.signin.connect("clicked", self.__signin_button_cb)
        else:
           self._edje.signal_callback_add("signin", "*", self.__signin_cb)
github kakaroto / e17 / OLD / BINDINGS / python / python-etk / examples / 03-entry.py View on Github external
#!/usr/bin/python

import etk


entry = etk.Entry()

def clear(e):
    print "Text was: \"%s\"" % e.text
    e.text = ""

def click(b, e):
    clear(e)

entry.text = 'some text'
entry.on_text_activated(clear)

bye = etk.Button(label="Click")
bye.on_clicked(click, entry)

box = etk.VBox()
box.append(entry, etk.VBox.START, etk.VBox.FILL, 0)