我想触发fb:login-button:
<fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
带有第二个按钮。为什么?我无法调整 Facebook 的 css,我想要一个带有自定义图像的精美按钮来替换它。我的大问题是我不知道 FB 按钮的 ID 是什么,而且我不能给它一个。
我的错误代码:
<script>
function Ffirst()
{
alert("first");
$("fb:login-button").click();
//$("fb:login-button").trigger("click"); //doesn't work eiter
}
</script>
<input type="submit" onclick="Ffirst()" name="savebutton" id="first" />
<fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
FTR:
这就是我按下时发生的情况the fb:login-button
FB.Event.subscribe('auth.authResponseChange', function(response) {
// Here we specify what we do with the response anytime this event occurs.
if (response.status === 'connected') {
testAPI();
}
} else if (response.status === 'not_authorized') {
FB.login();
} else {
FB.login();
}
}); …Run Code Online (Sandbox Code Playgroud) 我有 2 个按钮,其中一个应该在鼠标悬停时更改背景颜色。当鼠标悬停时,另一个人也应该保留他的背景图像。
我的问题是第二个也获得了鼠标悬停效果并且图像被覆盖了:(
<Window.Resources>
<Style x:Key="hover" TargetType="Button">
<Setter Property="Background" Value="#FF2598CE" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF24779D" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
Run Code Online (Sandbox Code Playgroud)
1.按钮
<Button Content="0" Name="num0" Foreground="White" Background="#FF2598CE" BorderBrush="#FF24779D" Style="{StaticResource hover}" />
Run Code Online (Sandbox Code Playgroud)
2.按钮
<Button Content="" Name="up" BorderBrush="#FF24779D">
<Button.Background>
<ImageBrush ImageSource="/Rechner;component/Images/btn_up.jpg" />
</Button.Background>
</Button>
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助
我有一些代码,如果 editText 字段中的字符少于 3 个,我需要禁用“创建帐户”按钮。如果用户输入 3 个字符,则按钮应启用自身以便可以使用。
我已经构建了 if else 语句,如果 editText 字段中的字符少于 3 个字符,则禁用按钮,但是在输入时,当用户插入 3 个字符时,它不会重新评估以查看该语句是否为真,因此按钮当然保持残疾。
用户在编辑文本字段中输入 3 个字符后,按钮应自行启用。
Button buttonGenerate = (Button) findViewById(R.id.btnOpenAccountCreate);
userInitials = (EditText) findViewById(R.id.etUserChar);
if (userInitials.getText().toString().length() > 3) {
// Account Generator Button
buttonGenerate.setEnabled(true); // enable button;
buttonGenerate.setOnClickListener(new OnClickListener() {
//Do cool stuff here
@Override
public void onClick(View v) {
}
});// END BUTTON
} else {
// If UserInitials is empty, disable button
Toast.makeText(this, "Please enter three(3) characters in the Initials Field ", Toast.LENGTH_LONG) …Run Code Online (Sandbox Code Playgroud) 我已经尝试了一整天,并查找了各种想法......没有真正的帮助。当我按下一个按钮,比如“JOG”,它会连续移动数控机床轴,只要按下按钮,然后松开,它就会停止。
为了测试这一点,我使用了一个“图片/LED”,当我按住它时,它应该打开……当我松开时,它应该关闭。
按下按钮应该 = 仅在按下时执行某些操作。释放相同的按钮 = 停止做你现在正在做的任何事情。
我敢肯定,对于你们这些先进的人来说,这可能是 101...但对我来说...它正在吃我的午餐...帮助?
我在 PyQT 中创建单击按钮时遇到了一些麻烦。当我创建如下按钮时,此图片无法保存
cv.SetImageROI(image, (pt1[0],pt1[1],pt2[0] - pt1[0],int((pt2[1] - pt1[1]) * 1)))
if self.Button.click():
cv.SaveImage('example.jpg', image)
cv.ResetImageROI(image)
Run Code Online (Sandbox Code Playgroud) 我正在开发一个 android 应用程序,其中问卷活动包含每个问题的单选按钮。我设计了线性布局的活动。所以现在我想检查用户是否回答了所有问题。我面临的问题在公共无效 OnClick(View v) 帮助我修改 java 代码。

<RadioGroup
android:id="@+id/Mquestion1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_1_rb1" />
<RadioButton
android:id="@+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_1_rb2" />
<RadioButton
android:id="@+id/radioButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_1_rb3" />
</RadioGroup>
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_2_view"
android:textAppearance="?android:attr/textAppearanceSmall" />
<RadioGroup
android:id="@+id/Mquestion2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/radioButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_2_rb1" />
<RadioButton
android:id="@+id/radioButton5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_2_rb2" />
<RadioButton
android:id="@+id/radioButton6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_2_rb3" />
</RadioGroup>
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_3_view"
android:textAppearance="?android:attr/textAppearanceSmall" />
<RadioGroup
android:id="@+id/Mquestion3"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/radioButton7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MQ1_3_rb1" />
<RadioButton
android:id="@+id/radioButton8" …Run Code Online (Sandbox Code Playgroud) 我正在使用 Qt Designer 作为 GUI 创建者处理 Python 项目。我试图创建一个圆形按钮,但只有QPushButton,这是一个正方形。我还尝试将单击事件绑定到圆形图像,但我不知道该怎么做。
我正在尝试在创建按钮后添加/删除 BitmapButton 的边框。我还没有找到任何工作示例来更新 BitmapButton 的外观。说
self.btn = wx.BitmapButton(self.panel, wx.ID_ANY, bmp, pos=(...))
self.Bind(wx.EVT_BUTTON, self.OnClick, self.btn)
Run Code Online (Sandbox Code Playgroud)
然后在 OnClick
def OnClick(self):
# what should be here to give / remove the border of the button being clicked
Run Code Online (Sandbox Code Playgroud)
谢谢
因此,在 Tkinter 中,按钮似乎具有浮雕属性。这默认为凸起,当按下按钮时,它会变为凹陷。我使用了relief=FLAT,但是当我点击这个按钮时它仍然是凹陷的。有没有办法让它在点击时有不同的浮雕?它会涉及更改边框颜色吗?
Button(text=day, width=2,
relief=FLAT, activebackground = self.color_clicked,
background = self.today_color)
Run Code Online (Sandbox Code Playgroud)
这看起来很平坦,但是当我点击它时,它会变成下沉的(很明显,当我松开时它会变回平面)。
我想知道是否有人可以帮助使用简单的 JavaScript 代码来单击页面上具有相同值名称/输入名称的所有按钮?
他们各自分享:
<input name="all" type="submit" value="Do All">
Run Code Online (Sandbox Code Playgroud)
这是按钮的屏幕截图:http : //oi61.tinypic.com/2nqblnr.jpg
也许应该制作一个可以用作“单击全部”按钮的按钮?这将是一个 chrome 扩展(供个人使用),所以我不能真正去更改“全部完成”按钮的代码。
我在谷歌上很难找到它,我对 HTML/CSS 很好,但对 JavaScript 真的很糟糕。