forked from mbk-lab/rui_orig
Added GetTableFootHeight() and GetTableHeadHeight()
This commit is contained in:
parent
09544fdf25
commit
043778d56b
|
@ -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 {
|
||||||
|
|
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue