我正在為 PS3 MW2 patch_mp.ff 開發(fā)一個(gè) .FF 編輯器,我的設(shè)計(jì)完全是黑暗主題,一切正常,但有一點(diǎn);在 ICSharpCode.TextEditor.TextEditorControl 中,數(shù)字在黑色背景上顯示為黑色,我從未在網(wǎng)上看到任何其他人發(fā)過此問題的帖子,因此無法找到解決問題的方法。我試過的:語法高亮策略方法通過 XSHD 文件設(shè)置所有 SystemColors 的外部語法高亮為 Color.White 等..以下是我創(chuàng)建 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貢獻(xiàn)2051條經(jīng)驗(yàn) 獲得超10個(gè)贊
答案:添加: <Digits name = "Digits" bold = "false" italic = "false" color = "White"/>
到我的語法高亮文件,結(jié)合我的高亮策略,然后設(shè)置任何你想要的白色: Color.FromArgb(255, 255, 255);
這應(yīng)該覆蓋任何系統(tǒng)顏色。
還要記住,您定義突出顯示 xshd 文件的順序和我的突出顯示策略很重要。文件本身和“SetHighlighting”方法必須首先完成,然后是高亮策略。
如果遇到此問題的其他人需要幫助,請(qǐng)通過http://discord.me/Poppy在 Discord 上訪問 hmu
- 1 回答
- 0 關(guān)注
- 221 瀏覽
添加回答
舉報(bào)
0/150
提交
取消