How To increase the speed of making GUI

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How To increase the speed of making GUI

sebastian lópez

I like to share with you a simple library that I create to automatically read images from an specific path, the porpuse is to simplify how to include images in our controls, also to be easy to maintain, so if you want to include a new image you just have to copy the image into a path and then tell the library where to search


Example:

>> from imagenes import imageEmbed

>> imag = imageEmbed(path='.', size=(32, 32)) # the pixels size, by default search in the current path

>> colombia_image = imag.colombia # colombia is the name of an image located in the current path

>> colombia_as_bitmap = colombia_image.bitmap

>> colombia_as_image = colombia_image.imag

>> colombia_as_icon = colombia_image.icon

>> colombia_as_wxImage = colombia_image.wxImage


The code was test under python 2.7 and wxpython 3.0.2.0 it would be nice if i you feed back ant test it under python 3.5 and wxpython phoenix




--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

imagenes.zip (69K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How To increase the speed of making GUI

sebastian lópez
The second topic is about how to expres the items creation.

#------> Excecuting this
from easyDialog import Ctrl

class Panel(wx.Panel):
    def __init___(self, parent, id, *args, **kwargs):
        wx.Panel.__init__(self, parent, id, *args, **kwargs)
       self.text_ctrl = Ctrl.TextCtrl('').\
              tooltip("What's your name?").\
              Bind(wx.EVT_TEXT, lambda evt: self.bitmap_btn.Enable(True))

       self.bitmap_btn =  Ctrl.BitmapButton(imagenes.colombia).\
             tooltip('A tool tip').\
             Enable(False).\
             Bind(wx.EVT_BUTTON, lambda evt: wx.MessageBox(self.text_ctrl.Value))

       main_sizer = Ctrl.sizer([self.text_ctrl, self.bitmap_btn], horzCenter=True, title='Input the name', horz=wx.HORIZONTAL)
       self.SetSizer(main_sizer)

# --- > Obtain this

so if I instroduce some code the button is the enabled


finally if I press the button the obtain this





# -----> Own analysis:
1) I guess there should be a simple way to create and maintain wxpython GUIs
2) The control container should feed which parent the control has, but implicit.
3) The syntaxis of the control could be express in terms of its properties i.e the tooltip, Bind, ...
4) it should exist a way to obtain the value of a control in a simple and generic way so for example the text control should has a Value property to get and set its value.
5) We can make an interface under python dealing with this problems.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How To increase the speed of making GUI

sebastian lópez
Finally

It would be nice if the comunity will develop an interface that could help developers to be more productive, so in my case I create an app that helps me to interact with the controls and experiment with the python shell


but it has its owner.



El domingo, 6 de noviembre de 2016, 16:44:15 (UTC-5), sebastián lópez escribió:
The second topic is about how to expres the items creation.

#------> Excecuting this
from easyDialog import Ctrl

class Panel(wx.Panel):
    def __init___(self, parent, id, *args, **kwargs):
        wx.Panel.__init__(self, parent, id, *args, **kwargs)
       self.text_ctrl = Ctrl.TextCtrl('').\
              tooltip("What's your name?").\
              Bind(wx.EVT_TEXT, lambda evt: self.bitmap_btn.Enable(True))

       self.bitmap_btn =  Ctrl.BitmapButton(imagenes.colombia).\
             tooltip('A tool tip').\
             Enable(False).\
             Bind(wx.EVT_BUTTON, lambda evt: wx.MessageBox(self.text_ctrl.Value))

       main_sizer = Ctrl.sizer([self.text_ctrl, self.bitmap_btn], horzCenter=True, title='Input the name', horz=wx.HORIZONTAL)
       self.SetSizer(main_sizer)

# --- > Obtain this

<a href="https://lh3.googleusercontent.com/-A5kzmx1SwLU/WB-jccXB_EI/AAAAAAAAGtE/nQ6W02Kmlg45pPZVQushzYGbtYPT_Il2QCLcB/s1600/export.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-A5kzmx1SwLU/WB-jccXB_EI/AAAAAAAAGtE/nQ6W02Kmlg45pPZVQushzYGbtYPT_Il2QCLcB/s1600/export.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-A5kzmx1SwLU/WB-jccXB_EI/AAAAAAAAGtE/nQ6W02Kmlg45pPZVQushzYGbtYPT_Il2QCLcB/s1600/export.png&#39;;return true;">

so if I instroduce some code the button is the enabled


<a href="https://lh3.googleusercontent.com/-4VK1bo2pTcU/WB-jy1nd6BI/AAAAAAAAGtI/bAzIGkF2W5grSEgv1BCPicWxNR4Y-kiwACLcB/s1600/export2.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-4VK1bo2pTcU/WB-jy1nd6BI/AAAAAAAAGtI/bAzIGkF2W5grSEgv1BCPicWxNR4Y-kiwACLcB/s1600/export2.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-4VK1bo2pTcU/WB-jy1nd6BI/AAAAAAAAGtI/bAzIGkF2W5grSEgv1BCPicWxNR4Y-kiwACLcB/s1600/export2.png&#39;;return true;">

finally if I press the button the obtain this


<a href="https://lh3.googleusercontent.com/-NyyI1f0i_jo/WB-kJ_50qiI/AAAAAAAAGtM/BTD8m3quL4km_i9Qi7agKLyKsh2uiRm3gCLcB/s1600/export3.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-NyyI1f0i_jo/WB-kJ_50qiI/AAAAAAAAGtM/BTD8m3quL4km_i9Qi7agKLyKsh2uiRm3gCLcB/s1600/export3.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-NyyI1f0i_jo/WB-kJ_50qiI/AAAAAAAAGtM/BTD8m3quL4km_i9Qi7agKLyKsh2uiRm3gCLcB/s1600/export3.png&#39;;return true;">




# -----> Own analysis:
1) I guess there should be a simple way to create and maintain wxpython GUIs
2) The control container should feed which parent the control has, but implicit.
3) The syntaxis of the control could be express in terms of its properties i.e the tooltip, Bind, ...
4) it should exist a way to obtain the value of a control in a simple and generic way so for example the text control should has a Value property to get and set its value.
5) We can make an interface under python dealing with this problems.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.