'宣言 Public ReadOnly Property DisplayChars As Infragistics.Win.UltraWinMaskedEdit.DisplayCharsCollection
public Infragistics.Win.UltraWinMaskedEdit.DisplayCharsCollection DisplayChars {get;}
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button3.Click ' 以下のコードはすべての表示文字でループし、各文字に ' 異なる前景色を設定します Me.ultraMaskedEdit1.InputMask = "$ nn,nnn.nn" Me.ultraMaskedEdit1.Value = 99999.99 Dim i As Integer For i = 0 To Me.ultraMaskedEdit1.DisplayChars.Count - 1 Dim dc As DisplayCharBase = Me.ultraMaskedEdit1.DisplayChars(i) Dim intensity As Integer = i * 255 / Me.ultraMaskedEdit1.DisplayChars.Count dc.Appearance.ForeColor = Color.FromArgb(intensity, 0, 0) Next End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button3_Click(object sender, System.EventArgs e) { // 以下のコードはすべての表示文字でループし、各文字に // 異なる前景色を設定します this.ultraMaskedEdit1.InputMask = "$ nn,nnn.nn"; this.ultraMaskedEdit1.Value = 99999.99m; for ( int i = 0; i < this.ultraMaskedEdit1.DisplayChars.Count; i++ ) { DisplayCharBase dc = this.ultraMaskedEdit1.DisplayChars[i]; int intensity = i * 255 / this.ultraMaskedEdit1.DisplayChars.Count; dc.Appearance.ForeColor = Color.FromArgb( intensity, 0, 0 ); } }