About Store Forum Documentation Contact



Post Reply 
ListColumn align
Author Message
khces Offline
Member

Post: #1
ListColumn align
hi grin
Code:
/******************************************************************************/
struct ListColumn // List Column
{
   STRUCT(Button , EE::Button)
   //{
      virtual void update(GuiPC &gpc);

      Button() {_resize_edge=0;}

   private:
      Int _resize_edge;
   };

   Bool       text_side; // text side, true=left, false=right
   Byte       precision; // data number precision, default=3
   Flt        width    ; // column width (can also be set to LCW_DATA, LCW_PARENT or LCW_MAX_DATA_PARENT)
   MemberDesc md       , // member description
             *sort     ; // member description used for sorting (if NULL then 'md' will be used instead, default=NULL)
   Button     button   ; // column button

   T1(TYPE) ListColumn(TYPE    &member                     , Flt width, CChar *name) : md(member            ) {create(NULL             , width, name);} // create using member auto-detection     , 'member'      =custom class member - 'MEMBER' macro usage is required  , 'width'=column width (can also be set to LCW_DATA, LCW_PARENT or LCW_MAX_DATA_PARENT), 'name'=column name
   T1(TYPE) ListColumn(Str    (*data_to_text)(C TYPE &data), Flt width, CChar *name)                          {create((Ptr)data_to_text, width, name);} // create using manual conversion function, 'data_to_text'=custom function converting data to text                 , 'width'=column width (can also be set to LCW_DATA, LCW_PARENT or LCW_MAX_DATA_PARENT), 'name'=column name
            ListColumn(DATA_TYPE type, Int offset, Int size, Flt width, CChar *name) : md(type, offset, size) {create(NULL             , width, name);} // create using manual member description , 'type'=data type, 'offset'=member offset in class, 'size'=sizeof member, 'width'=column width (can also be set to LCW_DATA, LCW_PARENT or LCW_MAX_DATA_PARENT), 'name'=column name
            ListColumn(                                                            )                          {create(NULL             ,     0, NULL);} // create empty

private:
   void create(Ptr data_to_text, Flt width, CChar *name);
};

ListColumn::text_side; // text side, true=left, false=right <---

not middle ?
I want text middle.

ps.englist sorry.
11-04-2011 11:24 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: ListColumn align
OK! I've placed it into roadmap
11-05-2011 03:17 PM
Find all posts by this user Quote this message in a reply
Post Reply