- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我们有一个 WinForms 控件,它是 ComboBox
的扩展版本,在没有选择或文本时支持“提示横幅”(又名水印)。我们的控件类似于这个implementation making use of CB_SETCUEBANNER .
但是,当我们将控件的 DropDownStyle
设置为 ComboBoxStyle.DropDown
(即,也允许自由文本输入)时,提示横幅显示,只是不是斜体(这是它通常显示的方式)。
有谁知道如何在 ComboBoxStyle.DropDown
模式下为组合框绘制斜体提示横幅???
最佳答案
按设计。当 Style = DropDown 时,组合框的文本部分是一个 TextBox。以非斜体样式显示提示横幅。您可以使用 this code 进行验证.当 Style = DropDownList 时,区分横幅和实际选择是很重要的,这无疑是他们选择将其显示为斜体的原因。 TextBox 的做法不同,它在获得焦点时隐藏横幅。
加入一个非精疲力尽的版本:
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
class CueComboBox : ComboBox {
private string mCue;
public string Cue {
get { return mCue; }
set {
mCue = value;
updateCue();
}
}
private void updateCue() {
if (this.IsHandleCreated && mCue != null) {
SendMessage(this.Handle, 0x1703, (IntPtr)0, mCue);
}
}
protected override void OnHandleCreated(EventArgs e) {
base.OnHandleCreated(e);
updateCue();
}
// P/Invoke
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, string lp);
}
关于c# - 当 DropDownStyle 为 DropDown 时,ComboBox Cue Banner 不是斜体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8904074/
上面是我页面中带有字幕轨道的 HTML5 视频片段。 我有这个 CSS ::cue { visibility: hidden;} 在 Chrome、Opera 和 Safar
问题很简单 - CUE 文件阅读器(如 Foobar)如何计算最后一首歌曲的持续时间? 这是示例: REM GENRE "Atmospheric Black Metal" REM DATE 2011
我有一个视频标签,我在其中动态传递视频数据,即 src 和 vtt,我只想为当前视频保留 vtt,并删除所有其他 textTracks. 现在切换视频时,与之前播放的视频相关的所有 vtt 开始在视频
我希望禁用 Cue 插件播放列表上的下一首轨道自动播放。在寻找如何做到这一点时,其他人以前使用的解决方案不再有效,因为此后代码发生了变化。 我在插件文件中找到了指示下一个轨道应该自动播放的代码位,但我
想要按钮在深蓝色背景上带有白色文本 xxx.vue 中的代码 sign out 风格是 .bg-blue { } .signout-button { border-radius:
我正在尝试为 HTML5 的 cue.onenter 事件动态分配函数。这是一项真正的新功能,目前仅在启用特定标志的 Chrome 中受支持(参见 HTML5 Rocks 上的示例 here)。 但是
我正在尝试隐藏视频元素上的字幕: 我正在使用以下 CSS: 视频::提示{ 可见性:隐藏; } 它在 Chrome 中运行良好,但在 Safari 上它仅隐藏文本,并且仍然呈现标题背景,如下所示: 我
我有一个大的 M4B 文件和一个 CUE 文件。我想将其拆分为多个 M4B 文件,或将其拆分为多个 MP3 文件(以前首选)。 我想在命令行中执行此操作(OS X,但如果需要可以使用 Linux),而
我正在尝试停止 Cue,然后再次播放。此代码在 Update() 循环中: Cue torpedoSound = soundBank.GetCue("torpedo"); torpedoSound.S
我需要使用 Popcorn.js 更改视频中的提示点。有没有办法编辑已通过 Cue() 方法发送给爆米花播放器的 Cue 事件的时间? 谢谢! 最佳答案 var events = Popcorn.ge
我正在尝试在视频中设置多个提示点。我不想写出每个提示,而是想遍历一个包含我需要的数据的对象,例如提示时间和有关如何处理回调的一些信息。 问题是,当我尝试遍历对象时,它会覆盖除最后一个提示之外的所有提示
当 ready for speech 时,Android 2.x 不会自动发出声音提示输入。 Android 4.1 可以。 这些版本之间发生了什么?即,什么时候引入了这个很酷的功能? Android
我们有一个 WinForms 控件,它是 ComboBox 的扩展版本,在没有选择或文本时支持“提示横幅”(又名水印)。我们的控件类似于这个implementation making use of C
我尝试将字幕添加到音轨。所有浏览器都可以正常工作,但不是 IE10 及以下。 这是我的代码: 然后我尝试从这条赛道中获得一些线索: var trackIE = $('track')[0
我承认这似乎是一个愚蠢的问题。但我和两位设计师在一家小商店里。我们的备份正在失控,因为如果需要进行更改(版本),它们只是复制/粘贴文件。 我已经准备好尝试 Subversion 来处理我们所有的文件、
我是一名优秀的程序员,十分优秀!