问题标签 [tabstop]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1351 浏览

xaml - 禁用 DatePicker 制表位

我正在使用DatePicker原始 WPF 工具包中的控件。

我正在尝试DatePicker从标签顺序中删除 。IsTabStop设置类似orTabIndexKeyboardNavigation.IsTabStop不真正起作用的属性。例如,设置TabIndex为 -1 会将其从跳位顺序中删除,直到我到达表单上跳位顺序的末尾并循环回到开头(这是我想要的行为)。一旦它循环了,它DatePicker就会回到标签顺序中。

问题似乎是DatePicker封装了TextBox实际的制表位。

如何在 XAML中设置's的IsTabStop属性?DatePickerTextBox

0 投票
1 回答
761 浏览

c# - 是否可以在一个全局位置为所有 StackPanel 关闭 TabStop?

我有许多 UserControl,每个都包含许多 StackPanel。我遇到的问题是,每个 StackPanel 似乎都认为我有兴趣在切换到 StackPanel 的内容之前对它进行切换。如果我想从 StackPanel_A 中存在的控件切换到 StackPanel_B 中存在的控件,我需要至少按两次制表符才能从第一个控件到 StackPanel_B,再到第二个控件。

我可以通过指定来关闭 TabStop,例如

但考虑到我有多少 StackPanel 元素,这既乏味又凌乱。

有没有办法让我在一个全球性的地方做到这一点?

0 投票
0 回答
396 浏览

.net - 加载表单后更改控件上的 TabStop

我有一个包含一组下拉列表的表单,在某些情况下我希望将其排除在标签顺序之外。我已将 TabStop 属性设置为 false,并且当我希望它们处于 Tab 键顺序时将其设置为 true。当用户单击该组中的一个下拉菜单时,我总是希望将它们全部包含在选项卡顺序中。为此,我在每个控件的 Enter 事件处理程序中将所有下拉列表的 TabStop 属性设置为 true。这会在 Enter 上产生奇怪的行为。每个控件似乎都选择了所有文本(突出显示)。我希望只有具有焦点的控件表现得像那样。谁能解释一下?谢谢!

我创建了一个具有相同奇怪行为的简单表单。当表单出现时,只需用鼠标单击任一下拉菜单,您将看到以下内容:

两个 ComboBox 都同时显示 SelectedText

这是 C# 中表单的代码:

0 投票
12 回答
21471 浏览

python - 如何用字符串中的空格替换自定义选项卡,具体取决于选项卡的大小?

我正在尝试编写一个不使用任何模块的python函数,该模块将采用具有制表符的字符串并将制表符替换为适合输入制表位大小的空格。但是,它不能只用 n 个空格替换所有大小为 n 的制表符,因为制表符可以是 1 到 n 个空格。我真的很困惑,所以如果有人能指出我正确的方向,我将不胜感激。

例如,如果 tabstop 最初的大小为 4:

但改为制表位 5:

我想我需要用空格填充字符串的末尾,直到 string%n==0 然后分块它,但我现在很迷茫..

0 投票
2 回答
2659 浏览

c# - 相同长度的字符串需要不同数量的制表符来格式化

我有多个长度相同的字符串,但它们似乎需要不同数量的制表位才能正确格式化。我不确定谷歌的用途,也没有得到任何对我有帮助的结果,所以我在这里问。

除了创建多个我不想要的控件之外,还有什么好的解决方案......

查看 Malzahar 和 Kassadin(相同的长度,相同数量的制表位,malzahar 的格式混乱)当前代码:

0 投票
1 回答
88 浏览

css - 虚线表格填充文本块

我试图在 HTML 中模仿以下文本样式:

文本示例

这是 Microsoft Word 的样式功能,可以使用 Tab Fills 进行设置。

这是我到目前为止所取得的成就:

至今

这不是一个好的解决方案(就我所遇到的这个问题而言,这是值得的)。

我检查了这样的参考资料:

http://jsfiddle.net/FpRp2/171/ - 关闭,但不支持多行文本

有任何想法吗?谢谢!

附加信息

  • 虚线填充不用于输入。出于法律原因,这些类型的文档不得包含任何可写的空格(手动或打印)。我们的想法是彻底清除所有内容。
0 投票
1 回答
217 浏览

c++ - Qt TabStop 颜色问题

在我的应用程序中,制表符控件上有一个烦人的白色矩形。我试图查看样式表,但 myitem:tabstop 样式没有做任何事情。有什么办法我可以以某种方式更改制表位颜色/或使其成为另一种形式。

0 投票
1 回答
1585 浏览

c# - TabStop and Focus on a GroupBox

I have created a custom control which extends GroupBox. This control supports collapsing and expanding and I use the GroupBoxRenderer and ButtonRenderer to make it look like a typical GroupBox that has a Button in the corner. I have handled all the appropriate mouse events which effectively make the "button" behave and look like a regular Button. Now I have hit a problem where the GroupBox does not receive focus using TabStop. Is there anyway that I can get my Collapsable GroupBox to receive focus from a TabStop?

I was hoping that I could use the trick from How to set focus to a control after validation in .NET to set the focus in the Enter event but I haven't come up with a good way of determining when it should actually get the focus. I could probably devise a way of finding the siblings with the next highest and lowest TabIndex (or ChildIndex if the same TabIndex) and then determine if they lost focus but this seems a bit hacky and a high chance of breaking if I don't get it exactly right.

Note: I did initially create user control but this was not what I wanted for various reasons including:

  1. It is not a control that contains a button and a groupbox (it just so happens to sort of look that way), it is a groupbox
  2. Flexibility
  3. Coupling between backend code and UI
  4. Dynamic layout
  5. Shared across many projects which require Toolbox support and customising the UI and layout of the entire control

Here is what it looks like when expanded: enter image description here

And now when it has been collapsed (and has focus): enter image description here

0 投票
1 回答
139 浏览

google-code - 如何在 Google 代码中设置制表符缩进?

我使用Visual Studio作为我的开发环境,tab缩进是4,但是我提交到google code后,在浏览器中缩进是8,这让我的代码看起来很难看。

有谁知道在网络浏览器中查看时如何将标签缩进重置为 4?

0 投票
1 回答
94 浏览

autohotkey - 可访问,但不在制表符顺序

有没有办法让编辑控件可访问,但不在制表符序列中?例如我有

我无法使用它(这很好),但我也无法使用 alt-a 来访问它,也无法通过鼠标单击它来访问它。这是一个问题,因为用户无法滚动和阅读其内容。

如果将 - 更改为 +,则可以通过制表符和 alt-a 访问它。但是我不希望它在制表符序列中。从 AutoHotkey 帮助/手册的“GUI 样式”页面来看,这些似乎是编辑命令的唯一相关样式......

我怎样才能使该控件可以访问,但在制表符序列之外?