当前位置: 首页>>代码示例>>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;未经允许,请勿转载。