0
A
回答
4
試試這個代碼:
// The index of the last (possibly only partially) visible line of the widget
int bottomIndex = JFaceTextUtil.getPartialBottomIndex((StyledText)widget);
// The index of the first (possibly only partially) visible line of the widget
int topIndex = JFaceTextUtil.getPartialTopIndex((StyledText)widget);
int visibleLines = bottomIndex - topIndex;
相關問題
- 1. 可見行數
- 2. StyledText空指針
- 3. Tableview可見行
- 4. SWT StyledText getCaretOffset給出錯誤的行號
- 5. Java SWT StyledText,更改起始行號
- 6. 如何強制StyledText打破行SWT
- 7. Java SWT顯示StyledText的行號
- 8. 定義可見行數來實現對可見單元格僅
- 9. SSRS行可見性
- 10. SSRS基於另一行可見性的行可見性
- 11. 當DOM可見時執行jQuery函數
- 12. C#的Excel互操作數可見行
- 13. 計算DataGrid中可見行的數量
- 14. 使用StyleRange設置StyledText BorderColor
- 15. CSV導出可見行
- 16. 最後一行不可見
- 17. 的TableView:調整可見行
- 18. 使可見過濾行
- 19. Slickgrid組行不可見
- 20. MonoTouch.Dialog - 最後一行可見?
- 21. 單個DataGrid行可見性
- 22. SSRS Sum可見父行組
- 23. Html.DropDownListFor使可見/不可見
- 24. 如何使索引在運行時可見/不可見
- 25. 設置JLabel在JButton被單擊時可見可見執行
- 26. 如何在運行時使窗口可見/不可見?
- 27. 使表格行不可見,但其內容可見
- 28. 表td邊框可見和不可見同一行
- 29. 僅刪除可見行的可見副本
- 30. powershell不可見的可執行文件
它的工作!我發現了另一種方式來做到這一點,但你更好。 getBounds()。height /(getLinePixel(2) - getLinePixel(1) – aphex