selectizeInput 显示在 absolutePanel 上方 - 如何避免 [英] selectizeInput getting displayed above the absolutePanel - how to avoid

查看:40
本文介绍了selectizeInput 显示在 absolutePanel 上方 - 如何避免的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面给出了我用于显示 selectizeInput 和 absolutePanel 的代码.selectizeInput 未与页面背景合并.它显示在 absolutePanel 上方.请帮我修复.

Given below the code i used for displying selectizeInput and absolutePanel. selectizeInput is not getting merged with the page background. it is displaying above the absolutePanel. please help me to fix.

ui.r

library(shinydashboard)
      shinyUI(
        fluidPage(
          dashboardPage(skin = c("blue"),
                        dashboardHeader(title = "R Tools"
                        ),
                        ## Sidebar content
                        dashboardSidebar(
                          sidebarMenu(
                            menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
                            menuItem("Widgets", tabName = "widgets", icon = icon("th"))
                          )

                        ),
                        dashboardBody(
                                          box(
                                            title = "Tools", status = "primary", solidHeader = TRUE,
                                            collapsible = TRUE,width = 4,
                                            uiOutput("showtxttruevalue"),
                                            uiOutput("showddllalternate")
                                          ),
                                          absolutePanel(
                                            bottom = 20, right = 60,top=200, width = "auto",
                                            draggable = TRUE,
                                            wellPanel(
                                            "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                                            aa")
                                            ), style = "opacity: 0.9"



                        )

          )


        ))

server.r

library(shiny)
library(ggplot2)
library(googleVis)

shinyServer(function(input, output, session) {




output$showtxttruevalue <- renderUI({
    numericInput(inputId="txttruevalue", label="TrueValue", value = 0)
 })


output$showddllalternate <- renderUI({
    selectizeInput("ddllalternate", "Alternate:",c('unequal','less','greater'),   selected='<>')
  })



  })

推荐答案

要修复它,请在定位 absolutePanel() 时使用 'left' 参数.使用以下内容对其进行定位.

To fix it, use the 'left' parameter while positioning the absolutePanel(). Use the following to position it.

absolutePanel(
                      left = 500, bottom = 20, right = 60,top=200, width = "auto",
                      draggable = TRUE,
                      wellPanel(
                        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                                            aa")
                    ), style = "opacity: 0.9"

这篇关于selectizeInput 显示在 absolutePanel 上方 - 如何避免的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆