Код таблицы в конструкторе.

14 октября 2017, 18:49
Реter Konow
0
50
//==============================================================================

NEW_GROUP, "Statistics table 1",   NEW_TABLE,"Statistics table 1",

//--------------------------------------------------------------------------------------------W,100,------------------------------W,150,--------------------------------- W,100,-----------------------------W,150,------
NEW_LINE, T_HEADER, "Trading statistics", C_HEADER, "Total profit",  C_HEADER, "Total loss", C_HEADER, "All trades", C_HEADER, "Profit trades", C_HEADER, "Loss trades", C_HEADER, "Best trade", C_HEADER, "Worst trade",  C_HEADER, "Long trades", C_HEADER,"Short trades", C_HEADER, "Profit factor", C_HEADER,"Av profit",  C_HEADER, "Av loss",  END_LINE,
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//-----------------------------------
//Интегрируем сворачиватели частей таблицы.
//------------------------------------------

 NEW_LINE,  T_FOLDER, "T folder main", TREE_ROOT,  _,UNFOLD,  END_LINE,
   
 ROOT, "T folder main",

NEW_LINE,  T_FOLDER, "T folder 1", END_LINE, 
NEW_LINE,  T_FOLDER, "T folder 2", END_LINE, 
NEW_LINE,  T_FOLDER, "T folder 3", END_LINE, 
//---------------------------------------------------------------
ROOT, "T folder 1", UNFOLD, 
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "January",H,50, CHECKBOX,"C1", H_SLIDER,"C2",   D_LIST,"C3",   BUTTON,"C4",    P_BAR,"C5",   S_EDIT,"C9",   R_BUTTON,"C6",    EDIT,"C7",    CELL,"C8",    CELL,"C10",    CELL,"C11",   CELL,"C12", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "February",  CHECKBOX,"C13",   HD_SLIDER,"C14", D_LIST,"C15",  BUTTON,"C16",   P_BAR,"C17",   S_EDIT,"C21",  R_BUTTON,"C18",   EDIT,"C19",   CELL,"C20",   CELL,"C22",   CELL,"C23",   CELL,"C24", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "March",     CHECKBOX,"C25",   H_SLIDER,"C26",  D_LIST,"C27",  BUTTON,"C28",   P_BAR,"C29",  S_EDIT,"C33",  R_BUTTON,"C30",   EDIT,"C31",   CELL,"C32",    CELL,"C34",   CELL,"C35",   CELL,"C36", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      ROOT, "T folder 2", UNFOLD, 
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "April",     CHECKBOX,"C37",   H_SLIDER,"C38",  D_LIST,"C39",  BUTTON,"C40",   P_BAR,"C41",   S_EDIT,"C45",  R_BUTTON,"C42",   EDIT,"C43",   CELL,"C44",   CELL,"C46",   CELL,"C47",   CELL,"C48", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, " May ",  H,50,CHECKBOX,"C49", HD_SLIDER,"C50",  D_LIST,"C51",  BUTTON,"C52",   P_BAR,"C53",   S_EDIT,"C57", R_BUTTON,"C54",   EDIT,"C55",   CELL,"C56",    CELL,"C58",   CELL,"C59",   CELL,"C60", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "June",      CHECKBOX,"C61",   H_SLIDER,"C62",  D_LIST,"C63",  BUTTON,"C64",   P_BAR,"C65",   S_EDIT,"C69", R_BUTTON,"C66",   EDIT,"C67",   CELL,"C68",    CELL,"C70",   CELL,"C71",   CELL,"C72", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "July",  H,50,CHECKBOX,"C73",  HD_SLIDER,"C74",  D_LIST,"C75",  BUTTON,"C76",   P_BAR,"C77",   S_EDIT,"C81",   R_BUTTON,"C78",   EDIT,"C79",   CELL,"C80",  CELL,"C82",   CELL,"C83",   CELL,"C84", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       ROOT, "T folder 3",UNFOLD, 
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "August",    CHECKBOX,"C85",  H_SLIDER,"C86",  D_LIST,"C87",  BUTTON,"C88",   P_BAR,"C89",    S_EDIT,"C93", R_BUTTON,"C90",   EDIT,"C91",   CELL,"C92",   CELL,"C94",   CELL,"C95",   CELL,"C96", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "September", CHECKBOX,"C97",  HD_SLIDER,"C98",  D_LIST,"C99",  BUTTON,"C100",  P_BAR,"C101",   S_EDIT,"C105", R_BUTTON,"C102",  EDIT,"C103",  CELL,"C104", CELL,"C106",  CELL,"C107",  CELL,"C108", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "October",   CHECKBOX,"C109", H_SLIDER,"C110", D_LIST,"C111", BUTTON,"C112",  P_BAR,"C113",  S_EDIT,"C117", R_BUTTON,"C114",  EDIT,"C115",  CELL,"C116",  CELL,"C118",  CELL,"C119",  CELL,"C120", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "November",  CHECKBOX,"C121", HD_SLIDER,"C122", D_LIST,"C123", BUTTON,"124",   P_BAR,"C125",   S_EDIT,"C129", R_BUTTON,"C126",  EDIT,"C127",  CELL,"C128", CELL,"C130",  CELL,"C131",  CELL,"C132", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NEW_LINE, R_HEADER, "December",  CHECKBOX,"C133", H_SLIDER,"C134", D_LIST,"C135", BUTTON,"C136",  P_BAR,"C137",  S_EDIT,"C241",  R_BUTTON,"C138",  EDIT,"C139",  CELL,"C140", CELL,"C142",  CELL,"C143",  CELL,"C144", END_LINE,
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

END_TABLE,  END_GROUP,

//-----------------------------------
//Устанавливаем длинну ячеек первого столбца.
//-----------------------------------
 "Statistics table 1",_SET_R_HEADER_WIDHT, 100,
//"Statistics table 1",_SET_C_HEADER_WIDHT, 150,
//-----------------------------------
//Устанавливаем высоту ячеек первого ряда.
//-----------------------------------
 "Statistics table 1",_SET_C_HEADER_HEIGHT, 50,
//-----------------------------------
//Устанавливаем стиль таблицы.
//-----------------------------------
 "Statistics table 1",_IS_ZEBRA_STYLE,
//-----------------------------------
//Включаем возможность менять ширину столбцов.
//-----------------------------------
 "Statistics table 1",_ADJUSTABLE_COLUMNS,
//-----------------------------------
//Включаем интерактивность таблицы.
//-----------------------------------
 "Statistics table 1",_IS_INTERACTIVE,
//-----------------------------------
//Устанавливаем стиль рамок ячеек как у старого виндоус.
//-----------------------------------
 "Statistics table 1",_OLD_WINDOWS_STYLE,
//-----------------------------------
//Устанавливаем позицию таблицы на ее канвасе.
//-----------------------------------
"Statistics table 1", AT,LEFT_TOP,1,1,
//-----------------------------------
//Устанавливаем позицию таблицы в окне.
//-----------------------------------
"Statistics table 1", IN, "View box 11",
//-----------------------------------
//Уставливаем свою дистанцию между ячейками.
//-----------------------------------
"Statistics table 1", X_GAP,1, _,Y_GAP,1,
//-----------------------------------
//Устанавливаем переключение интегрированных радио-кнопок.
//-----------------------------------
SWITCH, "C6", "C18","C30",                   END,
SWITCH, "C42", "C54","C66", "C78",           END,
SWITCH, "C90", "C102","C114","C126", "C138", END,
//==============================================================================
//Создаем группу пунктов выпадающих списков интегрированных в таблицу.
//-----------------------------------
NEW_GROUP, "C3 GROUP", IN, "C3",

NEW_LINE,  LIST_ITEM,"true", END_LINE,
NEW_LINE,  LIST_ITEM,"false", END_LINE,

END_GROUP,

//-----------------------------------------
//Позиционируем пункты внутри списков.
//-----------------------------------
"C3 GROUP", AT, LEFT_TOP,2,2,
//========================================================================================================================================================================================================


Поделитесь с друзьями: