HZGN.COM
welcome to my space
X
Welcome to:hzgn.com
Search:  
Feng Shui | Graphic Design | Cosmetics | Causes and Organizations | Regulatory Compliance | Gadgets and Gizmos | Computer Forensics | Tools and Equipment | Related articles
 HOME   Text Entry Widget
Text Entry Widget
Published by: cfz 2009-01-07

  • Tkinter Classes::
    Entry. A text entry field. Frame. A container widget. Standard scrollbars for use with canvas, entry, listbox, and text widgets. Text
    http://www.pythonware.com/library/tkinter/introduction/tkinter-classes.htm
    HOME
    can anyone tell me if the text entry widget is exposed via the xbmcgui module in python? *i took a look at the python.txt file mentioned in an earlier message but didn't see anything about it in there. *if you're wondering which widget i'm talking about, it is the location search widget used in the weather settings screen.

    this would be very handy to have available. *i'd like to use something like it to be able configure the hostname, database, user, password for accessing the mythtv database. *also, it would be handy in a schedule search screen for searching the mythtv television schedule or recorded shows.

    if it isn't possible, then i think i might try to write a custom window in python to be able to enter text.


  • here is a class that i put together by trial and error for handling font14 character widths... i haven't done other fonts yet.


    class fontattr:
    def ( self, name ):
    if name == "font14":
    self.initfont14()
    else:
    raise gui.exception, "unsupported font '" + name + "'"
    self.name = name

    def initfont14( self ):
    self.height = 14
    self.width = [ \
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    # sp ! " # $ % & '
    Gtk::Entry - Ruby-GNOME2 Project Website::
    text in a canvas or list widget, where pixel-exact positioning of the entry is important. used to render text in the entry, in widget coordinates.
    http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk::Entry
    HOME
    0, 0, 6, 6, 8, 14, 10, 19, 13, 4,
    #( ) * + , - . / 0 1
    7, 7, 24, 14, 6, 7, 6, 7, 10, 10,
    #2 3 4 5 6 7 8 9 : ;
    10, 10, 10, 10, 10, 10, 10, 10, 7, 7,
    #< = > ? @ a b c d e
    14, 14, 14, 9, 17, 11, 11, 11, 13, 11,
    #f g h i j k l m n o
    10, 13, 13, 7, 8, 11, 9, 15, 13, 13,
    #p q r s t u v w x y
    10, 13, 12, 11, 11, 12, 11, 17, 11, 11,
    #z [ \ ] ^ _ ` a b c
    11, 7, 7, 7, 14, 10, 10, 10, 11, 9,
    #d e f g h i j k l m
    11, 10, 6, 11, 11, 4, 5, 9, 4, 16,
    #n o p q r s t u v w
    11, 10, 11, 11, 7, 8, 6, 11, 9, 14,
    #x y z { | } ~
    9, 9, 8, 9, 7, 9, 14
    ]

    def getwidth( self, c ):
    return self.width[ord(c)]


  • just added your keyboard to cvs

    example of how to use it

    import xbmc

    keyboard = xbmc.keyboard('name')
    keyboard.domodal()

    if (keyboard.isconfirmed())
    *print keyboard.gettext()
    else
    *print 'user canceled'


  • i requested it, so i hope darkie will hear me http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/wink.gif

    but for now it's not included


  • seeing as easter seems to have come early over here, a function like:

    getlabellength(font,string)

    that would return the length of a text label using this font with this text. alternately, a 'text box' that automatically split lines at a certain (pixel) width (but only at specific characters eg spaces) and returned the total lines used would be good.

    would make life much easier writing for multiple resolutions and laying out text.


  • seeing as easter seems to have come early over here, a function like:

    getlabellength(font,string)

    that would return the length of a text label using this font with this text. alternately, a 'text box' that automatically split lines at a certain (pixel) width (but only at specific characters eg spaces) and returned the total lines used would be good.

    would make life much easier writing for multiple resolutions and laying out text.


  • where can i find the readme_python.txt file at?
    check xbmc cvs -> /docs/


  • that would return the length of a text label using this font with this text. alternately, a 'text box' that automatically split lines at a certain (pixel) width (but only at specific characters eg spaces) and returned the total lines used would be good.
    a textbox has been added 3 days ago or so,
    see readme_python.txt for details


  • thank you :)
    now i expect to see a cvs release very soon !


  • where can i find the readme_python.txt file at?


  • your default button color is probably the same as your background color therefore it blends in possibly.


  • have you tried supplying a focus texture and a no focus texture? here is the relevant info from the python_readme.txt.

    xbmcgui.controlbutton(int x, int y, int width, int height[, string text, string texturefocus, string texture nofocus])

    the texturefocus and texturenofocus parameters will probably need to be full paths to the texture files unless you are reusing the textures in texture.xpr (i.e. q:\skin\mediacenter\media\buttonfocus.png). you can call xbmc.getskindir() instead of hard coding "mediacenter" in the path if you like...


  • as we are currently talking about features in this thread, will there be a 'list' control? there is already a select dialog but i wanted to add a list to my normal window.

    i could of course create one from scratch, but if it's on the todo list.. :).


  • alx5962, i heard you :)
    and keyboard support in python will be added. i'll try to do it today.


  • alx5962, i heard you :)
    and keyboard support in python will be added. i'll try to do it today.
    darkie you are my idol :lol:


  • as we are currently talking about features in this thread, will there be a 'list' control? there is already a select dialog but i wanted to add a list to my normal window.

    i could of course create one from scratch, but if it's on the todo list.. .
    just added one to cvs for you
    check windowexample.py on how you can use it


  • getlabellength(font,string)

    that would return the length of a text label using this font with this text. alternately, a 'text box' that automatically split lines at a certain (pixel) width (but only at specific characters eg spaces) and returned the total lines used would be good.

    hmmm... i was just going to start figuring out how many horizontal pixels each character in font14 and font16 takes up. i already wrote a function to split a string into multiple lines at white space characters but it does it based on string length instead of actual pixel length. having a function like the one you mentioned above would definitely be handy... or a function that returned font attributes (e.g. pixel height of font, base line pixel height, character pixel widths, etc.) would be useful. then python utility functions can be written to do whatever calculations are needed.


  • i have just started using python and i am trying to use the controlbutton widget. i noticed that when i add a button, it doesn't look like a button, it simply looks like a label blending into the background until i select it, at which time it looks like a button.

    i am simply using "controlbutton(posx, posy, sizex, sizey, font)"

    can someone suggest the right way of making the button visible when not selected?

    also, i noticed in this post that there were changes made to python and added to cvs as recent as april 6th, but the only version i found in cvs is approx 2 months old (ver 1.3).
    is that the latest up to date version?

    thanks for your help.





  • Red Hat's Rough Recovery From CFO Exit
    Windows Live Finds a New, Pre-installed Home

    PRINT Add to favorites
  • poll which jonas brother poster do you want for christmas
  • victor newman newspaper link
  • how short should i cut my hair
  • i 039 ve had a dream of my dead grandad talking to me his voice was very soft he told me he worried about me
  • what does my dream mean if i dreamt i was having with a dead guy
  • guitar hero in real life
  • any people out there with youtube video ideas
  • braids or twists
  • who is this girl help
  • what are 2 pictures for each for conduction convection and radiation
  • i need ideas for what to download next
  • animal collective vs domakesaythink vs of montreal vs ween vs broken social scene vs holy fukc vs neutral mi
  • which jonas brother do you think is the best looking
  • how old is soulja boy also have you heard his song girl u stank take a bath
  • can someone rate and subscribe my youtube videos
  • why do people think lil wayne is cute
  • are there any other bands like this
  • what do you think this could mean
  • hair color and styles
  • how come every girl likes the jonas brothers
  • which jonas brother is the best lip syncher
  • where can i get a jonas brother shirt
  • what kinda hairstyle would look good on me
  • how do i make my hair thick again
  • how do i change my background art for my youtube account
  • anyone else no about this taylor lautner summit sux
  • how can i get my hair like this pics
  • is taylor lautner going to play jacob black in new moon
  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Text Entry Widget , Please add it free.
     Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 hzgn.com        Site made:CFZ