[vdr] Problems with TABs in OSD

Christian Wieninger cwieninger at gmx.de
Fri Mar 10 12:09:38 CET 2006


Hi,

you have to tell VDR the column length in the constructor, like this:

cMenuEPGSearchExt::cMenuEPGSearchExt()
:cOsdMenu("", 2, 20, 11, 6, 5)

Christian

----- Original Message ----- 
From: "Richard Reuters" <Lists at reuters-it.com>
To: "VDR Mailinglinst" <vdr at linuxtv.org>
Sent: Friday, March 10, 2006 12:00 PM
Subject: [vdr] Problems with TABs in OSD


> I'm writing a plugin and would like to display some OSD output in columns like 
> many other plugins and vdr itself does. But special characters like '\t' for 
> a tabulator are not working.
> 
> For examlple I've a cOSdMenu derived class and want to add an entry 
> (simplified):
> 
> class cItems : public cOsdMenu
> {
> private:
>        int  item_type;
>        char *header;
>        char *name;
> public:
>        cItems::cItems(int Type,const char *Text,const char *Header);
>        virtual ~cItems();
>        virtual eOSState ProcessKey(eKeys Key);
> };
> 
> class cItemsEntry : public cOsdItem {
> private:
>    char *entry;
> public:
>    cItemsEntry(const char *Entry);
>    ~cItemsEntry();
> }
> 
> cItems::cItems(int Type,const char *Text,const char *Header)
> :cOsdMenu("")
> {
>   item_type = Type;
>   header = strdup(Header);
>   name = strdup(Text);
> 
>   [...]
> 
>   // Display in columns
>   cItemsEntry *entry = new cItemsEntry("Col1 \t Col2 \t Col3");
>   Add(entry);
> 
>   Display();
> }
> 
> 
> cItemsEntry::cItemsEntry(const char *Entry)
> {
>   entry = strdup(Entry);
>   SetText(entry,false);
> }
> 
> 
> The entry is displayed as "Col1", so the text behind the first tabular just 
> disappears. Where is the error???
> 
> ciao
>  Richard Reuters
> 
> 
> _______________________________________________
> vdr mailing list
> vdr at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> 
>



More information about the vdr mailing list