标签: scrollable

Tkinter多帧调整大小

我有一台了解多种串行协议的设备.在开发过程中,我创建了简单的Tkinter UI来使用协议.每个协议都有一个新的UI.由于协议有很多命令,我在可滚动画布中实现了整个UI,以便在较小的显示器上使用时可以滚动它.单独的UI工作正常,我现在正在尝试将单独的UI组合到选项卡式UI中.

每个UI的常见元素是串行端口选择器,我将其分离并放入单独的顶部框架中.然后,我实现了一个笔记本,并将每个协议UI放入每个选项卡的框架中.

但我无法正确控制大小调整:我希望根窗口宽度固定在任何协议帧或串行选择器帧的最大宽度,并禁用水平调整大小.我希望串行选择器始终存在,并且在垂直调整窗口大小时不会影响(仅调整笔记本的大小/滚动).

以下是我到目前为止的情况.所有部件都存在,但笔记本没有填满整个窗口宽度,并且在调整窗口大小时笔记本不会调整大小(调整大小只会增加空白区域).

def main():
    ## Main window
    root = Tkinter.Tk()
    root.title("Multi-Protocol UI")

    ## Grid sizing behavior in window
    root.grid_rowconfigure(0, weight=0)
    root.grid_rowconfigure(1, weight=1)
    root.grid_columnconfigure(0, weight=1)
    root.grid_columnconfigure(1, weight=0)

    ## Window content
    upper = ttk.Frame(root)   # Serial port selector
    upper.grid(row=0)
    upper.grid_rowconfigure(0, weight=0)
    upper.grid_columnconfigure(0, weight=1)
    upper.grid_columnconfigure(1, weight=0)
    lower = ttk.Frame(root)   # For protocols
    lower.grid(row=1)
    lower.grid(row=1, sticky='nswe')
    lower.grid_rowconfigure(0, weight=1)
    lower.grid_columnconfigure(0, weight=1)
    lower.grid_columnconfigure(1, weight=0)

    # Setup serial control frame
    serial = SerialFrame(master=upper)  # Serial port selector widget + Open button

    ## Protocol GUIs …
Run Code Online (Sandbox Code Playgroud)

python resize tkinter frame scrollable

4
推荐指数
1
解决办法
5000
查看次数

如何使布局可滚动?Android的

嗨我正在尝试创建一个布局,其中包含一些图像视图按钮和一些文本,但问题是布局不可滚动.我是如何实现这一点的?提前谢谢了.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

   <ImageView
    android:id="@+id/imageView1"
    android:layout_width="match_parent"
    android:layout_height="204dp"
    android:scaleType="fitXY"
    android:src="@drawable/pic11elit" android:contentDescription="ss"/>

   <TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="whatever"
    android:textAppearance="?android:attr/textAppearanceLarge" />

   <TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"

    android:textAppearance="?android:attr/textAppearanceMedium" />

  <TextView
    android:id="@+id/textView3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Reservation No :27210 10020"
    android:textAppearance="?android:attr/textAppearanceMedium" />
         <Button
    android:id="@+id/On_back"
    style="?android:attr/buttonStyleSmall"
    android:layout_width="73dp"
    android:layout_height="wrap_content"
    android:onClick="On_back"
    android:text="back" />
      </LinearLayout>
Run Code Online (Sandbox Code Playgroud)

layout android scrollable

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

使文本在div中可滚动

我希望div通过向上或向下滚动来将一些冗长的文本包含在可以查看文本的位置.现在,"描述"文本是这样呈现的,<%= @pin.description.html_safe %>并且在<div class="panel-body>(我正在使用Bootstrap)中.

html css ruby-on-rails scrollable

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

底部导航和协调器布局中的可滚动工具栏

大家好

我正在尝试正确完成我的布局的scroll_behaviour。我的问题是,如果我将底部导航包装到相对的布局中,然后将主要内容放在其上方,那么当工具栏隐藏时,底部导航会滚动出屏幕。如果将底部导航作为协调器布局的另一个直接子级,则主要内容在我的BottomNavigation之后。我不想在主导航栏的底部添加填充/边距来解决此问题。您有什么提示或想法吗?

另一件事是,我的底部导航的涟漪效应仅在底部导航的顶部可见,而在我的主要内容之上而不可见。

向底部导航添加scroll_behaviour也不起作用。我想尝试固定的底部导航,或者在向下滚动时添加滚动动画,如google材质设计指南中所示。

这里的截图:

应用截图

这是布局代码:

<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
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"

>

<android.support.design.widget.AppBarLayout
    android:id="@+id/appBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:elevation="0dp"
    >


    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?android:attr/actionBarSize"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:layout_scrollFlags="scroll|enterAlways"
        >

    </android.support.v7.widget.Toolbar>


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

<RelativeLayout
    android:id="@+id/rl"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    >
    <com.getproperly.properlyv2.classes.misc.CustomViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

</RelativeLayout>

<android.support.design.widget.BottomNavigationView
    android:id="@+id/bottom_navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:layout_anchorGravity="bottom"
    app:layout_anchor="@id/rl"
    app:menu="@menu/bottom_navigation_main"
    />

<com.getproperly.properlyv2.classes.misc.SelfAwareFloatingActionButton
    android:id="@+id/fab_add"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_add_white"
    app:fabSize="normal"
    app:layout_anchor="@id/rl"
    app:layout_anchorGravity="bottom|right|end"
    app:layout_behavior="com.getproperly.properlyv2.classes.misc.ScrollAwareFABBehavior"
    android:layout_marginEnd="@dimen/fab_margin"
    android:layout_marginLeft="@dimen/fab_margin"
    android:layout_marginRight="@dimen/fab_margin"
    android:layout_marginStart="@dimen/fab_margin"
    android:layout_marginTop="@dimen/fab_margin"
    android:layout_marginBottom="64dp"/>
Run Code Online (Sandbox Code Playgroud)

感谢任何帮助!谢谢

android scrollable android-toolbar android-coordinatorlayout bottomnavigationview

4
推荐指数
1
解决办法
3748
查看次数

Android Widget 中的可滚动 TextView

我想创建一个带有可滚动文本视图的 Android 小部件。

对于这个问题 Making TextView可滚动的Android的解决方案 不能应用,因为它是一个小部件:

1.这个

 findViewById(R.id.textview).setMovementMethod(new MovementMethod());
Run Code Online (Sandbox Code Playgroud)

不起作用,因为findViewById在 中不可用,AppWidgetProvider而仅在 中可用Activity

2.ScrollView放置aTextView也不起作用,因为我得到一个 InflateException

 android.view.InflateException: Binary XML file line #23: Error inflating class ScrollView
Run Code Online (Sandbox Code Playgroud)

有人可以给我一个提示,如何使TextViewWidget 中的 可以滚动吗?

android textview android-widget scrollable android-appwidget

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

为什么我的页面不可滚动?

所以我做了一些使用以下css代码的页面:

html { overflow-y: scroll; }
    ul.navbar {
    list-style-type: none;
    position: fixed;
    top: 00px;
    left: 00px;
    width: 200px;
    height: 700px; 

    background-image:url('/images/B_left-background.png');
}

ul.header {
    position: fixed;
    top: -20px;
    left: 240px;
    height: 100px;
    width:700px;
    background-image:url('/images/B_left-top.png');
}

body {

    position: fixed;
    top: 100px;
    left: 300px;

    font-family: Georgia, "Times New Roman",
        Times, serif;

    background-color: #D6E9B4;
}
div.scrollableContainer {
    background: none repeat scroll 0 0 ;
    border: 1px solid #999999;
    height: 400px;
    margin: 40px;
    overflow: auto;
    width: 800px;
}
h1 {font-family: Helvetica, Geneva, Arial, …
Run Code Online (Sandbox Code Playgroud)

html css scrollable

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

如何创建可滚动的 ResultSet?

我得到了这个简单的代码来从 MSSQL Server 2008 中检索记录集,由于我设置了 ResultSet.TYPE_SCROLL_INSENSITVE,它必须是可滚动的,与 Javadoc 中的示例相同:

String qry = "SELECT * from tblPeople";
SQLConnection sql = new SQLConnection();
Statement stmt = sql.getConnection().createStatement(
                                        ResultSet.TYPE_SCROLL_INSENSITIVE,
                                        ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery(qry);
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我想获得如下行数时,我仍然得到了这个堆栈跟踪rs.last(); int rowCount = rs.getRow();

java.sql.SQLException: ResultSet may only be accessed in a forward direction.
    at net.sourceforge.jtds.jdbc.JtdsResultSet.checkScrollable(JtdsResultSet.java:304)
    at net.sourceforge.jtds.jdbc.JtdsResultSet.last(JtdsResultSet.java:551)
    at test.personen.Main.main(Main.java:44)
Run Code Online (Sandbox Code Playgroud)

为什么会这样,我该如何修复它(顺便说一下,当我检查 ResultSet 的类型时,我得到 1003 ..)?

java sql jdbc sqlexception scrollable

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

滑动菜单手势覆盖图形手势-android的可滚动手势

我使用从滑动菜单这里在我的应用程序.我的应用程序还有一个GraphView,我可以在其中实时设置一些数据.该图是一个可以向左和向右滚动的线性图.但是,通过从左到右手势的滑动菜单,用户无法在图表中滚动,因为菜单不断弹出.

有什么办法可以在按下某个项目时覆盖菜单功能吗?图形项只是一个LinearLayout.

我也在使用片段,所以每个菜单项都是一个片段.

android menu menuitem sliding scrollable

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

使div的内容可滚动

我正在使用wordpress与woocommerce创建eshop.Woocommerce有一部分名为mini-cart.php,它是客户的实际购物车.但是我需要这个购物车最多占整个网站高度的60%,我需要购物车内容可滚动.这很容易,但我需要的第二件事是从滚动中排除按钮和总数.我尝试了很多方法,但它永远不会奏效.这是我使用的代码:

<div class="cart active">
  <div class="cart-wrapper">
    <h1 class="widget-title"> </h1><div class="widget_shopping_cart_content"><div class="cart-product-list">
    <ul class="cart_list product_list_widget ">
      <li><a href="http://autoflex.zone42.sk/obchod/2x-stabilizator-predna-naprava-porsche-911-od-09-1997/">
          <img src="http://autoflex.zone42.sk/wp-content/uploads/2013/10/2x-stabilizátor-predná-náprava-Porsche-Boxster-od-09.1996-90x90.jpg" class="attachment-shop_thumbnail wp-post-image" alt="2x stabilizátor predná náprava Porsche 911 od: 09.1997" height="90" width="90">
                    2x stabilizátor predná náprava Porsche 911 od: 09.1997
          </a>
          <p class="quantity">1 × <span class="amount">50,90€</span></p>
     </li>
  </ul>
</div><!-- end product list -->    
<p class="total"><strong>Medzisú?et:</strong> <span class="amount">50,90€</span></p>  
    <div class="buttons">
        <a href="http://autoflex.zone42.sk/kosik/" class="button">
            <div class="cart-buttons">
                <div class="cart-buttons-padding">
                    Zobrazi? košík ?                </div>
            </div>
        </a>
        <a href="http://autoflex.zone42.sk/pokladna/" class="button checkout">
            <div class="cart-buttons">
                <div class="cart-buttons-padding">
                  poklad?a …
Run Code Online (Sandbox Code Playgroud)

css wordpress position overflow scrollable

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

标签溢出时可滚动的Kendo Tabstrip

当有标签溢出时,有没有人能够让Kendo标签滚动?

我现在可以使用制表符控件在底部显示滚动条,但这不是所需的行为,因为它也会移动内容.

我们只是希望能够在标签溢出时滚动它们.

有没有人完成这个?如果是这样,你是怎么做到的?

scrollable kendo-ui kendo-tabstrip

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