當前位置: 首頁>>代碼示例>>C#>>正文


C# TextBox.Invalidate方法代碼示例

本文整理匯總了C#中System.Windows.Forms.TextBox.Invalidate方法的典型用法代碼示例。如果您正苦於以下問題:C# TextBox.Invalidate方法的具體用法?C# TextBox.Invalidate怎麽用?C# TextBox.Invalidate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.TextBox的用法示例。


在下文中一共展示了TextBox.Invalidate方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: UpdateTextBox

 private void UpdateTextBox(TextBox txt, string data)
 {
     if (data == null) return;
     txt.AppendText(data);
     txt.SelectionStart = txt.TextLength;
     txt.ScrollToCaret();
     txt.Invalidate();
     Application.DoEvents();
 }
開發者ID:AudriusButkevicius,項目名稱:probable-bassoon,代碼行數:9,代碼來源:DespatchMain.cs

示例2: SetText

 private void SetText(TextBox tbControl, string text)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (tbControl.InvokeRequired)
     {
         SetTextCallback d = new SetTextCallback(SetText);
         this.Invoke(d, new object[] { tbControl,text });
     }
     else
     {
         tbControl.Text = text;
         tbControl.Invalidate();
     }
 }
開發者ID:patrickpaul,項目名稱:DSPControlCenter,代碼行數:16,代碼來源:FilterForm.cs

示例3: UpdatePreview

 protected override void UpdatePreview(TextBox previewBox, object ruleObject)
 {
     RuleExpressionCondition declarativeRuleDefinition = ruleObject as RuleExpressionCondition;
     if (declarativeRuleDefinition != null && declarativeRuleDefinition.Expression != null)
     {
         RuleExpressionCondition ruleExpressionCondition = new RuleExpressionCondition(declarativeRuleDefinition.Expression);
         NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
         previewBox.Lines = ruleExpressionCondition.ToString().Split('\n');
         NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
         previewBox.Invalidate();
     }
     else
     {
         previewBox.Text = string.Empty;
     }
 }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:16,代碼來源:ConditionBrowserDialog.cs

示例4: UpdatePreview

        protected override void UpdatePreview(TextBox previewBox, object ruleObject)
        {
            RuleSet ruleSet = ruleObject as RuleSet;

            NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
            previewBox.Lines = DesignerHelpers.GetRuleSetPreview(ruleSet).Split('\n');
            NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
            previewBox.Invalidate();
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:9,代碼來源:RuleSetBrowserDialog.cs

示例5: HELPER_updateTextBox

 /// <summary>
 /// Will update Text in a Text Box when the UI thread is still busy
 /// </summary>
 /// <param name="myTextBox">The TextBox control to update</param>
 /// <param name="myText">The Text to update</param>
 private void HELPER_updateTextBox(TextBox myTextBox, string myText)
 {
     myTextBox.Text = myText;
     myTextBox.Invalidate();
     myTextBox.Update();
     myTextBox.Refresh();
     Application.DoEvents();
 }
開發者ID:shuskey,項目名稱:3DFamilyTreeFileUtility,代碼行數:13,代碼來源:SignInFormWizard.cs

示例6: UpdatePreview

 protected override void UpdatePreview(TextBox previewBox, object ruleObject)
 {
     RuleSet ruleSet = ruleObject as RuleSet;
     System.Workflow.Activities.Common.NativeMethods.SendMessage(previewBox.Handle, 11, IntPtr.Zero, IntPtr.Zero);
     previewBox.Lines = DesignerHelpers.GetRuleSetPreview(ruleSet).Split(new char[] { '\n' });
     System.Workflow.Activities.Common.NativeMethods.SendMessage(previewBox.Handle, 11, new IntPtr(1), IntPtr.Zero);
     previewBox.Invalidate();
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:8,代碼來源:RuleSetBrowserDialog.cs


注:本文中的System.Windows.Forms.TextBox.Invalidate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。