标签: button

如何找出我的servlet中推送的HTML按钮?

我正在创建一个包含两个提交按钮的注册表单.我需要知道在我的servlet代码中单击哪个按钮?

html java jsp button

18
推荐指数
1
解决办法
6万
查看次数

有没有办法使用Qt Designer定义带有按钮和弹出菜单的QToolbar?

我想在Qt中有一个包含QActions或QToolbarButtons的工具栏,它们附有弹出菜单.通过创建QMenu,将其添加到QToolbarButton然后将其添加到QToolbar,我已经能够在代码中完美地完成此操作.我的问题是,这应该可以在设计师中完全完成.

这是我通过代码完成的工作,我想在qt designer中定义按钮和菜单:
http://img402.imageshack.us/img402/7669/exmaple.png

我们想要用qt设计器做的是将代码与接口分开.例如,这意味着一个人可以设计表单的外观和组件,然后程序员可以采用它并编写其背后的功能.如果工具栏和菜单必须由程序员设计,我们无法非常有效地完成此任务.

对于许多应用程序来说,这似乎是一个相当常见的要求,我无法看到Qt如何强制在代码而不是设计器中完成此操作.

如果有人对如何做到有任何想法,也许我在Qt中遗漏了一些东西?

qt designer button qtoolbar qmenu

18
推荐指数
2
解决办法
2万
查看次数

WPF按钮没有边框没有背景

我只需要一个简单的按钮,它看起来像一个TextBlock.前段时间我在SO上找到了一个答案,根据菜单中按钮的静态样式设置按钮的样式,但我找不到答案(我一直在搜索一小时).有谁知道我所指的系统风格以及将该风格应用于按钮的语法?

wpf styles button

18
推荐指数
2
解决办法
2万
查看次数

按钮和表单之间没有换行符

如何在没有换行的情况下在同一行中获取按钮和表单元素?非常感谢你!

  <button>ask question</button>
<form action="/search" method="get">
    <input type="text" name="q" value="{SearchQuery}"/>
    <input type="submit" value="Search"/>
    </form>
Run Code Online (Sandbox Code Playgroud)

html forms button

18
推荐指数
1
解决办法
3万
查看次数

在WPF中单击按钮后如何清除文本框?

如何清除textbox在WPF应用程序中单击一次按钮,我知道我必须在按钮的单击方法中执行此操作,但我应该使用什么代码来实现上述目的?

c# wpf xaml textbox button

18
推荐指数
5
解决办法
19万
查看次数

按钮不是第一次单击调用OnClickListener

我正在尝试开发一个登录页面,其中我有用户名,密码和一个按钮.当我第一次单击该按钮时,没有任何反应,但是当我第二次单击该按钮时,它可以正常工作.我很困惑,为什么会这样?

activity_login.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash_bg"
tools:context=".LoginActivity" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:orientation="vertical"
android:layout_margin="30dp" >

<EditText
    style="@style/EditText1"
    android:id="@+id/userEditText"
    android:layout_marginBottom="50dp"
    android:inputType="textNoSuggestions"
    android:singleLine="true"
    android:hint="username" />
 <EditText
    style="@style/EditText1"
    android:id="@+id/passEditText"
    android:inputType="textPassword"
    android:layout_marginBottom="50dp"
    android:hint="password" />
<Spinner
    android:id="@+id/locationSpinner"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:popupBackground="#ffffff"
    style="@style/EditText1"
   android:layout_marginBottom="50dp" />
<Button
   style="@style/Button1"
   android:focusable="true"
   android:focusableInTouchMode="true"
   android:onClick="onLoginClick"
   android:text="continue"
         />
Run Code Online (Sandbox Code Playgroud)

loginActivity.java

 @SuppressLint("DefaultLocale")
    public void onLoginClick(View view) {
        String username = mUserEditText.getText().toString();
        String password = mPassEditText.getText().toString();
        String location = mLocationData.get(
                mLocationSpinner.getSelectedItemPosition()).toLowerCase();
        if (username.isEmpty() || password.isEmpty()) {
            CreatorMessenger
                    .getInstance()
                    .showMessage(this, "Error!!",
                            "You need …
Run Code Online (Sandbox Code Playgroud)

java xml android button

18
推荐指数
3
解决办法
1万
查看次数

不使用setBackgroundDrawable方法以编程方式安装Android Button或TextView Border

我正在寻找一种方法,以编程方式为textview或按钮设置边框,而不使用setBackgroundResource方法.

我试图在这里实现的目标是,动态地改变背景颜色,但具有固定的边框.当我使用setBackgroundResource方法作为背景边框时,在以编程方式更改背景颜色后,边框不会保留.

android border button textview

18
推荐指数
1
解决办法
3万
查看次数

使用按钮隐藏输入类型"文件"

我想知道这是否可行?谷歌什么都没有.

基本上我想我的按钮模拟选择时,允许用户上传文件.我已经阅读了标签的可能性,但我需要使用按钮来执行UX/UI

<button style="position:fixed;bottom:10px;right:70px" type="button" class="btn btn-default">
    <input type="file" id="files" visbility="hidden" />
    <span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
</button>
Run Code Online (Sandbox Code Playgroud)

目前我的按钮看起来像这样: 在此输入图像描述 对此:

在此输入图像描述

html css jquery input button

18
推荐指数
3
解决办法
6万
查看次数

如何在android中的Action栏中创建按钮

我在Android应用程序上工作,我需要一个操作栏中的按钮.这些是我的活动和java文件.所以,我需要一个工具栏右侧的按钮.提前致谢.

content_b2_bdeliveries.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.ideabiz.riderapplication.ui.B2BDeliveriesActivity"
tools:showIn="@layout/activity_b2_bdeliveries">
//remaining code;
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

activity_b2_bdeliveries.xml:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.ideabiz.riderapplication.ui.B2BDeliveriesActivity">

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay">

</android.support.design.widget.AppBarLayout>

<include layout="@layout/content_b2_bdeliveries" />

</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)

B2BDeliveriesActivity.java:

public class B2BDeliveriesActivity extends AppCompatActivity {
private final String TAG_NAME="B2BActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_b2_bdeliveries);
    sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    ActionBar actionBar = getSupportActionBar();
    //Log.d(TAG_NAME,actionBar.toString());
    if (actionBar != null) {
        try {
            actionBar.setDisplayHomeAsUpEnabled(true);
            } catch …
Run Code Online (Sandbox Code Playgroud)

java xml android button android-actionbar

18
推荐指数
4
解决办法
5万
查看次数

Android按钮带圆角,涟漪效果,无阴影

我正在尝试使用圆角构建Android按钮.但是沿着圆角(左下角和右下角),周围有不必要的灰色阴影.

圆角按钮

这是我的代码:

drawable/my_button.xml

<?xml version="1.0" encoding="utf-8"?>
  <selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
      <shape android:shape="rectangle">
        <stroke android:width="1dp" android:color="#ffa6c575" />
        <solid android:color="#ffa6c575"/>
        <corners android:radius="15dp" />
      </shape>
    </item>
  </selector>
Run Code Online (Sandbox Code Playgroud)

然后在布局xml文件中,我有:

<LinearLayout
  <Button
    android:id="@+id/buy_button"
    android:layout_width="0dp"
    android:layout_weight="1"
    android:layout_height="35dp"
    android:layout_gravity="center"
    android:background="@drawable/my_button"
    android:textColor="@android:color/white"
    android:text="BUY" />

  <View
    android:layout_width="10dp"
    android:layout_height="match_parent"
    android:background="@android:color/transparent" >
  </View>

  <Button
    android:id="@+id/sell_button"
    android:layout_width="0dp"
    android:layout_weight="1"
    android:layout_height="35dp"
    android:layout_gravity="center"
    android:background="@drawable/my_button"
    android:textColor="@android:color/white"
    android:text="SELL" />

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

1)如何摆脱圆角(左下角和右下角)的额外灰色阴影?

2)按钮具有默认的波纹效果.如何保持默认的连锁效果?

android button rounded-corners ripple

18
推荐指数
4
解决办法
2万
查看次数

标签 统计

button ×10

android ×4

html ×3

java ×3

wpf ×2

xml ×2

android-actionbar ×1

border ×1

c# ×1

css ×1

designer ×1

forms ×1

input ×1

jquery ×1

jsp ×1

qmenu ×1

qt ×1

qtoolbar ×1

ripple ×1

rounded-corners ×1

styles ×1

textbox ×1

textview ×1

xaml ×1