Home Download Buy Blog Forum Support

Paint box in Sublime

Paint box in Sublime

Postby davidmatas on Fri Mar 30, 2012 8:17 am

Hi!

Any way to paint this kind of box in Sublime Text? Any package?

Image

Thanks!
davidmatas
 
Posts: 9
Joined: Fri Feb 17, 2012 1:33 pm

Re: Paint box in Sublime

Postby bizoo on Fri Mar 30, 2012 8:54 am

You could probably find something in Python to draw this kind of box, but doing it by yourself is pretty easy.
This is the code that draw your exemple (from TODO package):
Code: Select all
    def header(self):
        hr = u'+ {0} +'.format('-' * 76)
        return u'{hr}\n| TODOS @ {0:<68} |\n| {1:<76} |\n{hr}\n'.format(
            self.textdecode(datetime.utcnow().strftime('%A %d %B %Y %H:%M')),
            u'{0} files scanned'.format(self.file_counter),
            hr=hr)

You can try to make it more generic and create a method (function) that get a text and a size parameters and return/draw it.
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Paint box in Sublime

Postby davidmatas on Fri Mar 30, 2012 11:44 am

Sorry but I'm not expert in Phython :(

I was searching some Package to doing it automatically
davidmatas
 
Posts: 9
Joined: Fri Feb 17, 2012 1:33 pm


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 30 guests