标签: button

动画启用 UIBarButtonItem?

有没有办法以动画方式启用或禁用按钮?我尝试了以下方法但没有成功。我猜测此时启用的属性无法像不透明度那样进行动画 \xe2\x80\x93\xc2\xa0 但我希望我是错的。

\n\n
    [UIView beginAnimations:nil context:nil];\n    [UIView setAnimationDuration:1.0f];\n    theButton.enabled = YES;\n    [UIView setAnimationDelegate:self];\n    [UIView commitAnimations];\n
Run Code Online (Sandbox Code Playgroud)\n\n

我不敢相信没有一个setEnabled:(BOOL)enabled animated:(BOOL)animated方法。

\n

iphone animation core-animation button uibarbuttonitem

2
推荐指数
1
解决办法
2316
查看次数

如何获取 QDialogBu​​ttonBox 创建的按钮的名称?

我正在尝试获取窗口的所有按钮子窗口小部件。这些按钮是通过QDialogBu​​ttonBox创建的。如何获取取消/确定/保存按钮?

我有:

QWidget *pWin = QApplication::activeWindow();
QList<QPushButton *> allPButtons = pWin->findChildren<QPushButton *>();
QListIterator<QPushButton*> i(allPButtons);
while( i.hasNext() )
{
  //identify which button is cancel/ok/save button here
  /*Note: This is where I'm having trouble, getting the text of the 
    button here returns NULL. Any other way of Identifying which is 
    which?
    Is it a special case when buttons are created through QDialogButtonBox?       
   */
}
Run Code Online (Sandbox Code Playgroud)

c++ qt widget button

2
推荐指数
1
解决办法
3622
查看次数

pygtk中按钮的悬停事件触发函数

我想当鼠标悬停在按钮上时更改按钮的文本,

喜欢这个http://www.youtube.com/watch?v=l7vCf_lvUsY

如何在pygtk中鼠标悬停在按钮上时添加事件

我在文档中找不到这个

python events pygtk button

2
推荐指数
1
解决办法
1581
查看次数

Android R.anim,未找到摇动

我已按照以下教程进行操作:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Animation1.html

代码很好,直到我到达:

Animation shake = AnimationUtils.loadAnimation(this, R.anim.shake);
Run Code Online (Sandbox Code Playgroud)

看来 R.anim 不存在,eclipse 建议在 R 类型中创建一个字段或在 R 类型中创建一个常量。如果我错了,请纠正我,但我不认为这两者都是解决方案。

我正在运行 Google API、平台 2.2、API 8 - 我尝试过更高级别,但没有什么区别。我想要完成的只是点击按钮时摇动......

任何反馈表示赞赏,

谢谢

animation android button

2
推荐指数
1
解决办法
3944
查看次数

ios按下时更改按钮标题字体

我是 iOS 新手,我想知道是否可以在按下按钮时更改按钮的标题字体,我可以在按钮突出显示时更改按钮的颜色:

[button setTitleColor:[UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0] forState:UIControlStateHighlighted];
Run Code Online (Sandbox Code Playgroud)

有没有类似的东西可以改变按钮的字体大小,而不编写按钮按下的方法。(我想改变突出显示状态的字体,所以我不确定buttonPressed方法是否能清楚地工作)

fonts button ios

2
推荐指数
1
解决办法
4995
查看次数

文本对齐ckeditor

我找不到如何添加按钮来格式化我的文本:

text-align:center;
text-align:left;
text-align:right;
text-align:justify;
Run Code Online (Sandbox Code Playgroud)

我有v4版本

http://ckeditor.com/demo

我尝试找到解决方案,但只找到一些问题帖子。

也许使用插件?

我正在使用 ckEditor,例如:

<textarea id="monday" class="ckeditor" name="monday" ><?php echo $this->datas['monday']; ?></textarea>
Run Code Online (Sandbox Code Playgroud)

谢谢

css text-align button ckeditor

2
推荐指数
1
解决办法
9499
查看次数

Firefox 不扩展包含按钮的绝对定位 div

我有两个 div,两个都是绝对定位的,一个在另一个里面,用作菜单。在内部元素中,我有一些应该展开父 div 的按钮元素。理论上来说 Chrome 和 IE 都不错。但我无法让它在 Firefox 中工作。这些按钮不会展开父 div。

奇怪的是,如果我在按钮后面添加一个额外的 a 标签元素,它就会起作用。

CSS

/* .Menu-Wrapper and .Menu have to have postion: absolute */

.Menu-Wrapper {
    position: absolute;
    top: 100px;
    left: 100px;
}
.Menu {
    background: yellow;
    position: absolute;
    top: 0;
    left: 0;
    padding: 6px;
}
.Menu-item {
    background: red;
    border: 0;
    margin: 2px;
    padding: 0;
    display: block;
    white-space: nowrap;
    width: 100%;
    text-align: left;
}
Run Code Online (Sandbox Code Playgroud)

html

<div class="Menu-Wrapper">
        <!-- there would be a trigger button here, left out for …
Run Code Online (Sandbox Code Playgroud)

css firefox button styling

2
推荐指数
1
解决办法
960
查看次数

按钮内的可访问嵌套按钮?

我正在尝试构建一个看起来像 Zoom 按钮的按钮。

按钮内的缩放按钮

这里有一个按钮可以在相机按钮内选择一个设备。我想创建类似的东西,你有一个按钮和另一个按钮,在里面展开一个选择器。

您如何以易于访问的方式创建它?

如果我在 React 中嵌套按钮,它会抛出错误,你不能在另一个按钮中嵌套一个按钮。Zoom 的等效项是:

<button>
  Stop Video
  <button>Pick Device</button>
</button>
Run Code Online (Sandbox Code Playgroud)

这不起作用。您将如何创建这样的界面以使其保持可访问(和有效)?

html accessibility nested button reactjs

2
推荐指数
1
解决办法
1076
查看次数

如何在 R Shiny 应用程序中对齐 downloadButton 和 ActionButton?

我有一个 Shiny 应用程序,侧边栏上有两个按钮,但我无法对齐它们。我尝试了此处给出的解决方案(Shiny R 对齐按钮),但它对我不起作用。

这是它们的样子。

这是一个可重现的代码:


library(shiny)
library(DBI)
library(shinydashboard)
library(DT)
library(shinyjs)


ui <- dashboardPage(
#Header 
  dashboardHeader(title = "Labware dashboard"),
#Sidebar with download button  
  dashboardSidebar(
    width = 130,
    downloadButton('downloadData',
                   'Download',
                   style = "color: #fff; background-color: #27ae60; border-color: #fff"),
#Create a button in the sidebar to stop app
    useShinyjs(),
    extendShinyjs(text = jscode, functions = ("closeWindow")),
    actionButton("close", "Close window", 
                icon("close"),
               style = "color: #fff; background-color: red; border-color: #fff")
  ),
  
  dashboardBody()
  
  )


server <- function(input, output, session) {
  

  #close the …
Run Code Online (Sandbox Code Playgroud)

r button shiny

2
推荐指数
1
解决办法
473
查看次数

SwiftUI - 按下按钮时移动和旋转图像

我有一个图像,我希望它在 y 轴上旋转,并在按下按钮时移向视图的底部。我尝试使用 .onChange,但出现错误“调用 'animation' 的结果未使用”,我理解其中的含义,但我既不明白它为什么会出现,也不明白如何解决它。

这是我的代码:

import SwiftUI

struct ContentView : View {

    @State var animateCoin = false
    @Environment(\.colorScheme) var colorScheme

        var body: some View {

 Rectangle()
        .foregroundColor(colorScheme == .dark ? .white : .black)
        .frame(width: 150, height: 150, alignment: .center)
        .offset(y: -60)
        .mask(Image("Coin") //That's the name of the Image I have in the assets
                      .resizable()
                      .onChange(of: animateCoin, perform: { value in
                            self.animation(.easeIn) //I put .easeIn just as an example, because the .rotation3DEffect gives me a red warning
                        }))

Button(action: …
Run Code Online (Sandbox Code Playgroud)

animation image rotation button swiftui

2
推荐指数
1
解决办法
520
查看次数