2023-09-13 09:58:42 +04:00

37 lines
855 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.ComponentModel;
namespace VisualComponentsLib.CustomListBox
{
[DefaultEvent(nameof(TextChanged))]
public partial class UserListBox : UserControl
{
[Browsable(true)]
public string selectedString
{
get => listBox.SelectedItem.ToString();
set => listBox.SelectedItem = value;
}
public UserListBox()
{
InitializeComponent();
}
[Browsable(true)]
public new event EventHandler? TextChanged
{
add => listBox.Items.Add(value);
remove => listBox.Items.Clear();
}
}
}