combobox 相关问题

Combobox允许从多个选项中选择一个(类似于下拉列表),或者键入自定义选项。

将 ComboBox(表单控件)中的宏复制到另一个单元格中

这个宏的想法是,一旦在第17行选择了Release选项,第18行将根据图像隐藏。 它一直有效,直到我尝试将 ComboBox 复制到另一个单元格中,在本例中为第 23 行...

回答 1 投票 0

ComBox 更改后用时间计算填充列表框

我这里有一个简单的用户表单,它根据组合框的更改填充列表框。 组合框中唯一列表的代码: 私有子用户窗体_Initialize() '使用此代码获得动态组合框...

回答 1 投票 0

将列表中的多个变量绑定到一个组合框

我刚刚开始学习WPF和C#。 考虑: private void TransferAccountButtonClick(对象发送者, RoutedEventArgs e) { 列表 allClients = Client.JsonToList(); TransferStackP...

回答 1 投票 0

设置 ComboBox.Cursor 不适用于默认/箭头光标

在 C# 的 Windows 窗体中,在设计器文件中,这些都可以正常工作: this.someComboBox.Cursor = System.Windows.Forms.Cursors.AppStarting; this.someComboBox.Cursor = System.Windows.Forms.Cu...

回答 1 投票 0

将枚举值添加到简单的组合框

我有一个关于 C# 和 WPF 的非常简单的问题要问。 在我的这次尝试之后,我的问题将随之而来: private void Window_Loaded(对象发送者, RoutedEventArgs e) { 前...

回答 8 投票 0

使用javascript在devexpress组合框中获取所选项目id

我认为有一个 devexpress 组合: Html.DevExpress().ComboBox(s => { s.Name = idPola; s.Style.Add("浮动", "左"); foreach(列表中的SelectListItem项) ...

回答 1 投票 0

ComboBox ListFillRange 动态范围问题。如何使下拉菜单不包含错误的单元格?

所以我有一个搜索文件,以便查找我工作地点的警报面板号码。我为不同的建筑物设置了一张桌子,为每栋建筑物内的区域设置了另一张桌子,一张带有

回答 1 投票 0

如何验证自动完成组合框,以便用户不会在 vb.net 中的自动完成列表之外键入内容

如何验证自动完成组合框,以便用户不会在 vb.net 中的自动完成列表之外键入内容。所以我希望用户必须从自动完成组合框中选择列表而不是...

回答 1 投票 0

在 Vuetify 组合框中更新模型时出现问题

我在使用 v-combobox 时遇到问题。 (看 代码示例)。 如果我执行以下操作,就会出现问题: 在组合框中输入字符串 在组合框未获得焦点之前单击“保存”按钮。 ...

回答 4 投票 0

我想将 ttk.Combobox 转换为 CTkComboBox,但它不起作用

首先,我将展示原始代码,即 def apply_filter(过滤器): 图像 = Image.open(文件路径) 宽度,高度 = int(image.width / 2), int(image.height / 2) 图像 = image.resize((w...

回答 1 投票 0

C# 中的右对齐组合框

默认情况下,C# 组合框中的项目左对齐。 除了重写 DrawItem 方法和设置组合框绘制模式之外,是否有任何选项可以更改此理由 --> Dr...

回答 4 投票 0

VBA 表单,组合框中的选择应在文本框中查看描述

我有一个组合框工作表,其中有一些数据可以通过动态名称范围填充组合框,但我坚持使用文本框来获取前面单元格中的值,不知道要使用什么、偏移量或...

回答 1 投票 0

JavaFX/CSS:更改 ComboBox 所选项目的文本颜色

我正在使用一个名为 JFoenix 的自定义 JavaFX 库,它使用 Google 的 Material Design 彻底修改了一些 JavaFX 组件。我特别遇到的问题是更改梳子的文本颜色...

回答 3 投票 0

C# WindowsForm 组合框

我想使用windows表单作为注册表单;同时,我决定在按下“保存”按钮时将 ComboBox 项目导入到数组中,然后我可以使用 next 和

回答 1 投票 0

为什么我得到 System.Collections.Generic.List`1[VoltageStablizer.EnterParams+Invoice] 而不是 Wpf 中的列表内容

我决定做一个关于电压稳定器的小项目。我尝试将数据从 ComboBox 插入到 WPF 中的 DataGrid 中。 我创建了发票类: 公开课发票 { 公共字符串

回答 1 投票 0

如何在UWP中使ComboBox的项目布局采用全宽

我有以下 ComboBox,其中包含用于组合框 ItemTemplate 的自定义 DataTemplate: 我有以下 ComboBox,其中包含用于组合框 ItemTemplate 的自定义 DataTemplate: <ComboBox SelectedIndex="{x:Bind PaletteType.GetHashCode()}" x:Name="PaletteComboBox" MinWidth="200" ItemsSource="{x:Bind ComboPalettes}" SelectionChanged="PaletteComboBox_OnSelectionChanged"> <ComboBox.ItemTemplate> <DataTemplate x:DataType="adapters:ComboPaletteAdapter"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"></ColumnDefinition> </Grid.ColumnDefinitions> <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch"> <TextBlock Text="{x:Bind PaletteNameTranslatedResource}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,0,0" /> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Spacing="8" Margin="0,4,0,0"> <Border Width="24" Height="24" Background="{x:Bind CurrentPalette.ColorRed, Converter={StaticResource ColorToBrushConverter}, Mode=OneWay}" CornerRadius="26" IsTapEnabled="False" x:Uid="SettingsPaletteColorRedTT" /> <Border Width="24" Height="24" Background="{x:Bind CurrentPalette.ColorOrange, Converter={StaticResource ColorToBrushConverter}, Mode=OneWay}" CornerRadius="26" IsTapEnabled="False" x:Uid="SettingsPaletteColorOrangeTT" /> <Border Width="24" Height="24" Background="{x:Bind CurrentPalette.ColorGreen, Converter={StaticResource ColorToBrushConverter}, Mode=OneWay}" CornerRadius="26" IsTapEnabled="False" x:Uid="SettingsPaletteColorGreenTT" /> <Border Width="24" Height="24" Background="{x:Bind CurrentPalette.ColorBlue, Converter={StaticResource ColorToBrushConverter}, Mode=OneWay}" CornerRadius="26" IsTapEnabled="False" x:Uid="SettingsPaletteColorBlueTT" /> </StackPanel> </StackPanel> </Grid> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> 我想在颜色边框的左侧添加文本,同时将颜色向右对齐,但似乎HorizontalAlignment="Stretch"不起作用。 项目占用的空间始终取决于其内容: 如何使每个项目占据组合框下拉菜单的全宽? 不漂亮。但它有效。我不知道有任何其他方式来访问视觉 СomboBox 项目。 <ComboBox Name="ComboPalettesComboBox" ItemsSource="{Binding ComboPalettes}"> <ComboBox.ItemTemplate> <DataTemplate> <Grid Loaded="ItemGrid_OnLoaded"> <DockPanel> <TextBlock Text="{Binding}"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel.Resources> <Style TargetType="Border"> <Setter Property="Width" Value="24"/> <Setter Property="Height" Value="24"/> <Setter Property="CornerRadius" Value="26"/> </Style> </StackPanel.Resources> <Border Background="Red"/> <Border Background="Orange"/> <Border Background="Green"/> <Border Background="Blue"/> </StackPanel> </DockPanel> </Grid> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> private readonly List<Grid> _gridList = new List<Grid>(); private bool _gridListIsFull; private double _maxGridWidth; public MainWindow() { InitializeComponent(); Loaded += (sender, args) => { Popup popup = ComboPalettesComboBox.Template.FindName("PART_Popup", ComboPalettesComboBox) as Popup; popup.Opened += (o, args2) => { foreach (Grid grid in _gridList) { grid.Width = _maxGridWidth; } _gridListIsFull = true; }; }; } private void ItemGrid_OnLoaded(object sender, RoutedEventArgs e) { if (_gridListIsFull) { _gridList.Clear(); _gridListIsFull = false; _maxGridWidth = 0; } Grid grid = (Grid)sender; if (grid.ActualWidth > _maxGridWidth) { _maxGridWidth = grid.ActualWidth; } _gridList.Add(grid); } 如何在 UWP 中使 ComboBox 的项目布局采用全宽 您出现此行为的原因是您将列的 Width 设置为 Auto。请直接使用 * 来代替。 像这样: <Grid.ColumnDefinitions> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefinitions> 结果如下:

回答 2 投票 0

VBA:获取一个组合框来显示唯一值以从过滤表数据中进行选择 - 然后通过过滤后的数据运行特定搜索

您好,感谢您点击并花费您的时间。我并不自豪只是寻求帮助,但由于这个项目的截止日期,我已经没有时间正确理解和解决它了......

回答 1 投票 0

ExtJS 4.1.3 过滤器组合框

这是一个由两部分组成的问题: 主要问题:假设我有一个从商店中提取的组合框(代码如下)。假设我有一个数组,我想用它来过滤数据,以便只有某些值起作用...

回答 2 投票 0

WinUI3中绑定ComboBox中的选中项

我在WinUI3中有一个组合框,其中手动添加了两个项目: ...

回答 1 投票 0

如何在首次单击时激活组合框(Datagridview)

在winforms中,您需要单击组合框两次才能正确激活它 - 第一次聚焦它,第二次真正获得下拉列表。 我如何改变这种行为,以便它

回答 7 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.