forked from mbk-lab/rui_orig
2
0
Fork 0

Added GetTableFootHeight() and GetTableHeadHeight()

This commit is contained in:
Alexei Anoshenko 2022-01-16 13:39:59 -05:00
parent 09544fdf25
commit 043778d56b
2 changed files with 26 additions and 9 deletions

View File

@ -1130,8 +1130,8 @@ func (table *tableViewData) htmlSubviews(self View, buffer *strings.Builder) {
buffer.WriteString("</colgroup>") buffer.WriteString("</colgroup>")
} }
headHeight, _ := intProperty(table, HeadHeight, table.Session(), 0) headHeight := GetTableHeadHeight(table, "")
footHeight, _ := intProperty(table, FootHeight, table.Session(), 0) footHeight := GetTableFootHeight(table, "")
cellBorder := table.getCellBorder() cellBorder := table.getCellBorder()
cellPadding := table.boundsProperty(CellPadding) cellPadding := table.boundsProperty(CellPadding)
if cellPadding == nil { if cellPadding == nil {

View File

@ -117,14 +117,31 @@ func GetTableVerticalAlign(view View, subviewID string) int {
return TopAlign return TopAlign
} }
// // GetTableHeadHeight returns the number of rows in the table header.
//HeadHeight = "head-height" // If the second argument (subviewID) is "" then a value from the first argument (view) is returned.
func GetTableHeadHeight(view View, subviewID string) int {
if subviewID != "" {
view = ViewByID(view, subviewID)
}
if view != nil {
headHeight, _ := intStyledProperty(view, HeadHeight, 0)
return headHeight
}
return 0
}
//HeadStyle = "head-style" // GetTableFootHeight returns the number of rows in the table footer.
// If the second argument (subviewID) is "" then a value from the first argument (view) is returned.
//FootHeight = "foot-height" func GetTableFootHeight(view View, subviewID string) int {
if subviewID != "" {
//FootStyle = "foot-style" view = ViewByID(view, subviewID)
}
if view != nil {
headHeight, _ := intStyledProperty(view, FootHeight, 0)
return headHeight
}
return 0
}
// GetTableCurrent returns the row and column index of the TableView selected cell/row. // GetTableCurrent returns the row and column index of the TableView selected cell/row.
// If there is no selected cell/row or the selection mode is NoneSelection (0), // If there is no selected cell/row or the selection mode is NoneSelection (0),