0
A
回答
1
有很多至90度旋轉字體。 VB6使用stdole2類型庫的OLE StdFont對象部分。
您必須將StdFont轉換爲GDI字體才能操作它。
這是一個非常好的帖子(Text At Any Angle),帶有示例代碼可以繼續這樣做。
該示例繪製在窗體上,但我認爲您可以獲取MSFlexGrid的句柄並將其繪製到該窗體中。
然後,您可以控制文本何時以及如何繪製。如果要在運行時編輯垂直文本,則可以在編輯文本時在單元格上顯示水平文本框,然後在完成編輯時繪製新文本。
0
若你正在談論文字的垂直旋轉。
您可以將文本轉換爲旋轉圖像,然後加載圖像。
而且這個...
可以打印旋轉的文本到PictureBox控件,然後分配到PictureBox到細胞。
此鏈接顯示該方法的類似用法,但原因稍有不同。
+0
是的,我的意思是垂直旋轉的文本。我想過這個解決方案,但是像excel這樣的快速編輯呢?請檢查我附上的圖片 – Smith 2010-09-21 12:43:15
0
沒有內置,但這裏是我用了幾年前一個黑客。您將一個字符串傳遞給該函數,並在每個字符之後傳回帶有回車符和換行符的字符串。
Private Function VerticalString(ByVal strInput As String) As String
Dim strReturn As String
Dim i As Integer
For i = 1 To Len(strInput)
strReturn = strReturn & Mid$(strInput, i, 1) & vbCrLf
Next i
If Len(strReturn) > 1 Then
strReturn = Mid$(strReturn, 1, Len(strReturn) - 1)
End If
VerticalString = strReturn
End Function
Private Sub FillGrid()
flexgrid1.TextMatrix(1, 0) = VerticalString("Kc Chiefs")
End Sub
相關問題
- 1. AsyncTask with ProgressDialog vs orientation orientation
- 2. orientation Android
- 3. 與flexgrid的codeigniter
- 4. 與flexgrid codeigniter
- 5. ComponentOne FlexGrid爲空
- 6. Force iPhone Orientation
- 7. JQM Orientation SVG Scale
- 8. XNA/Directx Handedness(orientation)?
- 9. ios 6 orientation
- 10. android display orientation
- 11. Force UIViewController orientation
- 12. orientation tablet vs phone
- 13. Javascript Object orientation + DOM?
- 14. Image Orientation(python + openCV)
- 15. 用文件填充flexgrid vb6
- 16. 「orientation | keyboardHidden」not calling onConfigurationChanged
- 17. VideoView&Fullscreen&Orientation changes - Android
- 18. CSS Orientation風景問題android
- 19. 指定android:configChanges =「orientation」時保存狀態_before_ orientation change
- 20. ComponentOne的FlexGrid背景顏色
- 21. 性能問題與FlexGrid的
- 22. 檢索的FlexGrid項目
- 23. SuspendLayout使用C1 FlexGrid WPF
- 24. UIDeviceOrientation * orientation = [UIDevice currentDevice] .orientation;得到一個'不兼容的類型初始化'錯誤
- 25. 搜索後只顯示一行。 flexgrid vb6
- 26. Flexgrid VB6中的透明標籤控件
- 27. Flexgrid聖盃百分之百高度
- 28. 如何正確處理android:configChanges =「orientation | screenSize」
- 29. configChanges =「orientation」在Galaxy Nexus上不會觸發
- 30. Phonegap - 更新版本pg-plugin-screen-orientation?
非常感謝您的回答,我該如何水平翻轉文本框? – Smith 2010-09-26 15:30:28
我假設你的意思是把文本框垂直?我認爲如果你想要的話,你必須通過GDI自己繪製文本框和文本。這裏的問題是顯示文本靜態(將其繪製到每個繪畫事件的表單上)和動態(使文本與其環境交互)之間的區別。我認爲,甚至擅長顯示垂直文字時,在編輯時在水平控件中顯示文字。我也不確定這是以垂直位置編輯文本的最實用還是用戶友好的方式。 – Nope 2010-09-26 18:46:25