Imports Infragistics.Win Imports Infragistics.Win.UltraWinEditors Imports Infragistics.Win.UltraWinEditors.UltraWinCalc Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Set Text Display Properties Me.UltraCalculatorDropDown2.AutoDetectDecimalSymbol = False Me.UltraCalculatorDropDown2.AutoDetectGroupSymbol = False Me.UltraCalculatorDropDown2.DecimalSymbol = "," Me.UltraCalculatorDropDown2.DigitGrouping = True Me.UltraCalculatorDropDown2.GroupSymbol = "." ' Set UI Display Properties. Me.UltraCalculatorDropDown2.CalculatorShowMemoryButtons = False ' Initialize text portion of calculator to the edit value of the drop down. Me.ultraCalculatorDropDown1.CaclulatorDropDownStyle = CaclulatorDropDownStyle.KeepCurrentValue ' Show Custom Buttons so we can implement custom functionality in 'response to the ActionButtonPressed events. Me.UltraCalculatorDropDown2.CalculatorShowCustomButtons = True Me.UltraCalculatorDropDown2.Buttons("C1").Text = "F1" Me.UltraCalculatorDropDown2.Buttons("C8").Text = "Update" Dim Button As CalculatorButton = Me.UltraCalculatorDropDown2.Buttons("C5") Button.Text = "+100" Button.Appearance.BackColor = System.Drawing.Color.OliveDrab ' Hide the rest Me.UltraCalculatorDropDown2.Buttons("C2").Visible = False Me.UltraCalculatorDropDown2.Buttons("C3").Visible = False Me.UltraCalculatorDropDown2.Buttons("C4").Visible = False Me.UltraCalculatorDropDown2.Buttons("C6").Visible = False Me.UltraCalculatorDropDown2.Buttons("C7").Visible = False End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinEditors; using Infragistics.Win.UltraWinEditors.UltraWinCalc; private void Form1_Load(object sender, System.EventArgs e) { // Set Text Display Properties this.ultraCalculatorDropDown1.AutoDetectDecimalSymbol = false; this.ultraCalculatorDropDown1.AutoDetectGroupSymbol = false; this.ultraCalculatorDropDown1.DecimalSymbol = ","; this.ultraCalculatorDropDown1.DigitGrouping = true; this.ultraCalculatorDropDown1.GroupSymbol = "."; // Initialize text portion of calculator to the edit value of the drop down. this.ultraCalculatorDropDown1.CaclulatorDropDownStyle = CaclulatorDropDownStyle.KeepCurrentValue; // Set UI Display Properties. this.ultraCalculatorDropDown1.CalculatorShowMemoryButtons = false; // Show Custom Buttons so we can implement custom functionality in // response to the ActionButtonPressed events. this.ultraCalculatorDropDown1.CalculatorShowCustomButtons = true; this.ultraCalculatorDropDown1.Buttons["C1"].Text = "F1"; this.ultraCalculatorDropDown1.Buttons["C8"].Text = "Update"; CalculatorButton button = this.ultraCalculatorDropDown1.Buttons["C5"]; button.Text = "+100"; button.Appearance.BackColor = System.Drawing.Color.OliveDrab; // Hide the rest this.ultraCalculatorDropDown1.Buttons["C2"].Visible = false; this.ultraCalculatorDropDown1.Buttons["C3"].Visible = false; this.ultraCalculatorDropDown1.Buttons["C4"].Visible = false; this.ultraCalculatorDropDown1.Buttons["C6"].Visible = false; this.ultraCalculatorDropDown1.Buttons["C7"].Visible = false; }