标签: button

单击后如何防止WPF按钮保持突出显示?

单击标准WPF按钮时,它会以蓝色突出显示(可能使用任何Windows主题设置的蓝色),并且在您与任何其他控件进行交互之前,它会一直保持突出显示.对于我的应用程序,它对用户来说很困惑.

是否有一个简单的方法将其关闭并使按钮恢复正常的样式?我使用的是.NET 4.

.net c# wpf focus button

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

使用透明背景单击时,ImageButton不会突出显示

我已将ImageButton设置为透明,因此该图标与背景幕控面板(如Android ActionBar)相匹配.这看起来很好,因为我想要它.

但是,当背景透明时,按下操作栏中的透明按钮时,您看不到蓝色突出显示.

我可以拥有一个透明的ImageButton,点击时还有高亮显示吗?

<ImageButton
    android:id="@+id/nextItemButton"
    style="?android:attr/buttonStyleSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:background="@null"
    android:src="@drawable/ic_media_ff" />
Run Code Online (Sandbox Code Playgroud)

transparency android button

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

以Twitter Bootstrap按钮为中心

我正在使用Twitter Bootstrap创建一个表单,并且我很难将按钮置于中心位置.它包含在一个跨度为7的div中.下面是HTML,按钮位于最底部.关于如何集中这件事的任何建议?

<div class="form span7">
  <div id="get-started">
    <div id="form-intro">
      <strong><h1>1. Get Started: Some basics</h1></strong>
    </div>
    <form class="form-horizontal">
      <div class="control-group">
        <label class="control-label" for="inputSaving">What are you saving for?</label>
        <div class="controls">
          <input class="span4" type="text" id="inputSaving" placeholder="e.g. Swimming Lessons, Birthday Party, College Fund, etc.">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="description">Add a short description</label>
        <div class="controls">
          <textarea class="span4" id="description" rows="4" placeholder="Describe in your own words the saving goal for this piggybank"></textarea>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="categoryselect">Choose a Category</label>
        <div class="controls">
          <select class="span4" …
Run Code Online (Sandbox Code Playgroud)

html css button twitter-bootstrap

38
推荐指数
5
解决办法
12万
查看次数

Android Notification按钮未显示

这是我用按钮设置通知的代码.

Intent receiverIntent = new Intent(ctx, ResponsivePrefsActivity.class);
        PendingIntent pReceiverIntent = PendingIntent.getActivity(ctx, 1, receiverIntent, 0);
        Intent clearIntent = new Intent(ctx, ResponsivePrefsActivity.class);
        clearIntent.setAction("clear");
        PendingIntent pClearIntent = PendingIntent.getActivity(ctx, 1, clearIntent, 0);

        Intent colorsIntent = new Intent(ctx, ResponsivePrefsActivity.class);
        colorsIntent.setAction("colors");
        PendingIntent pColorsIntent = PendingIntent.getActivity(ctx, 1, colorsIntent, 0);

        Intent animationIntent = new Intent(ctx, ResponsivePrefsActivity.class);
        animationIntent.setAction("animation");
        PendingIntent pAnimation = PendingIntent.getActivity(ctx, 1, animationIntent, 0);

        Notification.Builder builder;
        builder = new Notification.Builder(ctx).setSmallIcon(R.drawable.ic_launcher).setAutoCancel(false)
                .setContentTitle("Draw Me: A Live Wallpaper").setContentText("Never get bored again!")
                .setContentIntent(pReceiverIntent).addAction(R.raw.ic_menu_close_clear_cancel, "Clear", pClearIntent)
                .addAction(R.raw.ic_menu_edit, "Colors", pColorsIntent).addAction(R.raw.ic_menu_play_clip, "Animation", pAnimation);
        Notification notification …
Run Code Online (Sandbox Code Playgroud)

notifications android action button

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

android以编程方式设置按钮背景

我想知道如何以编程方式设置按钮颜色?我编写了以下代码但失败了:

Button11.setBackgroundColor(R.color.red);
Run Code Online (Sandbox Code Playgroud)

谢谢!!

android button

37
推荐指数
4
解决办法
9万
查看次数

如何在android中为按钮文本设置特定字体?

我希望我的按钮文本在Copperplate Gothic Light字体中,但我还没有遇到一个简单的干净代码,因为它具有简单的功能.救命!

PS:由于android自带了ariel和其他一些字体,我们需要导入 (因为我刚接触这个字体而缺少更好的单词)我们希望使用的字体.这就是我迄今为止所能收集到的所有内容,这就是我的最终结果.

fonts android text button

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

按钮中的Android进度条

是否有可能在按钮中显示旋转进度条?例如作为背景可绘制?

android button progress-bar

36
推荐指数
3
解决办法
4万
查看次数

IOS:一个用于多个按钮的IBAction

在我的项目中我必须控制40个按钮的动作,但我不想创建40个IBAction,我可以只使用IBAction,怎么样?

xcode objective-c button ibaction ios

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

如何重置为默认按钮BackColor?

我正在尝试按钮背景颜色的不同选项,最后更改BackColor了外观类别中的属性.然后,我将其更改为默认情况Control,但它仍然与其他按钮看起来不同:

按钮截图

我已经尝试构建项目并重新启动Visual Studio,但它没有帮助.

我知道我可以拖动另一个按钮并复制/粘贴代码,但是首先导致这种情况的原因是什么?如何正确修复它?

.net button backcolor visual-studio winforms

36
推荐指数
4
解决办法
8万
查看次数

如何打开没有操作栏的导航抽屉,只需一个按钮即可打开

我有一个没有任何操作栏的导航栏(我不想要一个操作栏).我正在尝试这样做,以便我有一个可以打开导航抽屉的按钮.

我知道有对DrawerLayout一个名为openDrawer方法 http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html#openDrawer(android.view.View)

我不知道如何使用它,但我在点击时尝试制作一个按钮,运行此方法:

DrawerLayout mDrawerLayout = (DrawerLayout) getView().findViewById(R.id.drawer_layout);
mDrawerLayout.openDrawer(mDrawerLayout);
Run Code Online (Sandbox Code Playgroud)

当我点击它时,它给了我一个Java NullPointerException.有人有什么想法吗?

编辑:此代码在片段内,我试图在片段外引用这些抽屉布局.我使用了调试器,它显示mDrawlerLayout为NULL.

有什么建议?

谢谢!

android button navigation-drawer drawerlayout

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