亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

ICSharpCode.TextEditor.TextEditorControl 中的數字顯示為黑色

ICSharpCode.TextEditor.TextEditorControl 中的數字顯示為黑色

C#
蠱毒傳說 2022-12-31 13:29:59
我正在為 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


查看完整回答
反對 回復 2022-12-31
  • 1 回答
  • 0 關注
  • 228 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號