我正在為 PS3 MW2 patch_mp.ff 開發一個 .FF 編輯器,我的設計完全是黑暗主題,一切正常,但有一點;在 ICSharpCode.TextEditor.TextEditorControl 中,數字在黑色背景上顯示為黑色,我從未在網上看到任何其他人發過此問題的帖子,因此無法找到解決問題的方法。我試過的:語法高亮策略方法通過 XSHD 文件設置所有 SystemColors 的外部語法高亮為 Color.White 等..以下是我創建 TextEditorControl 的方式: private TextEditorControl AddNewTextEditor(string title) { tab = new TabPage(title); tab.ForeColor = Color.White; TextEditorControl textEditorControl = new TextEditorControl(); textEditorControl.ForeColor = Color.White; textEditorControl.Dock = DockStyle.Fill; textEditorControl.IsReadOnly = false; textEditorControl.ContextMenuStrip = contextMenuStrip2; textEditorControl.Text = readgsc; TextEditorControl Editor = textEditorControl; Font font = new Font("Consolas", 9f); if (font.Name == "Consolas") Editor.Font = font; Editor.ForeColor = Color.White; Editor.SetHighlighting("GSC"); Editor.BorderStyle = BorderStyle.FixedSingle; Editor.EnableFolding = true; Editor.ShowVRuler = false; Editor.Document.FormattingStrategy = new FormattingStrategy(); Editor.Document.FoldingManager.FoldingStrategy = new MyFolding(); Editor.IndentStyle = IndentStyle.Smart; Editor.Document.DocumentChanged += (sender, e) => SetModifiedFlag(Editor, true); Editor.TextChanged += new EventHandler(FileHasBeenEdited);
1 回答

侃侃無極
TA貢獻2051條經驗 獲得超10個贊
答案:添加: <Digits name = "Digits" bold = "false" italic = "false" color = "White"/>
到我的語法高亮文件,結合我的高亮策略,然后設置任何你想要的白色: Color.FromArgb(255, 255, 255);
這應該覆蓋任何系統顏色。
還要記住,您定義突出顯示 xshd 文件的順序和我的突出顯示策略很重要。文件本身和“SetHighlighting”方法必須首先完成,然后是高亮策略。
如果遇到此問題的其他人需要幫助,請通過http://discord.me/Poppy在 Discord 上訪問 hmu
- 1 回答
- 0 關注
- 228 瀏覽
添加回答
舉報
0/150
提交
取消