{"id":85,"date":"2012-01-30T14:50:02","date_gmt":"2012-01-30T14:50:02","guid":{"rendered":"http:\/\/www.corrspt.com\/blog\/?p=85"},"modified":"2012-01-29T17:03:54","modified_gmt":"2012-01-29T17:03:54","slug":"scrollbars-in-a-xeo-viewer","status":"publish","type":"post","link":"https:\/\/www.corrspt.com\/blog\/2012\/01\/30\/scrollbars-in-a-xeo-viewer\/","title":{"rendered":"Scrollbars in a XEO Viewer"},"content":{"rendered":"<p>When creating an XEO Viewer you&#8217;ll probably run into the &#8220;scrollbar issue&#8221;. \u00a0Not all container components (such as panel or section) add scrollbars when the content exceeds the available space. In order for you to assure that your content is visible you need to wrap your content using the Tab component, like the following:<\/p>\n<pre class=\"brush:xml\">&lt;xvw:tabs&gt;\r\n\r\n   &lt;xvw:tab label='Test'&gt;\r\n\r\n       &lt;!-- Your content goes here  --&gt;\r\n\r\n    &lt;\/xvw:tab&gt;\r\n\r\n&lt;\/xvw:tabs&gt;<\/pre>\n<p>Which produces the following result:<\/p>\n<div id=\"attachment_119\" style=\"width: 410px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-label.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-119\" class=\"size-full wp-image-119\" title=\"Tab with Label and Scrollbar\" src=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-label.png\" alt=\"Tab with Label and Scrollbar\" width=\"400\" height=\"336\" srcset=\"https:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-label.png 400w, https:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-label-300x252.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-119\" class=\"wp-caption-text\">Tab with Label and Scrollbar<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>This will make the scrollbar appear if needed. If you set a label for the tab (as in the example with the &#8220;Test&#8221; label) it will be rendered as such. If you don&#8217;t set a label for the tab it will still render the space for that empty label which is not very pretty. In order to make that go away you can use the <em>renderTabBar<\/em> property of the parent <em>xvw:tabs<\/em> component to make that tab bar disappear (but still use a tab component), like in the following listing:<\/p>\n<pre class=\"brush:xml\">&lt;xvw:tabs renderTabBar='false'&gt;\r\n\r\n   &lt;xvw:tab&gt;\r\n\r\n       &lt;!-- Your content goes here  --&gt;\r\n\r\n    &lt;\/xvw:tab&gt;\r\n\r\n&lt;\/xvw:tabs&gt;<\/pre>\n<p>Which will produce the following result (with scrollbars as needed) :<\/p>\n<div id=\"attachment_120\" style=\"width: 410px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-nolabel.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-120\" class=\"size-full wp-image-120\" title=\"Tab with No Label and Scrollbar\" src=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-nolabel.png\" alt=\"Tab with No Label and Scrollbar\" width=\"400\" height=\"334\" srcset=\"https:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-nolabel.png 400w, https:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2012\/01\/scrollbar-tab-nolabel-300x250.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-120\" class=\"wp-caption-text\">Tab with No Label and Scrollbar<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When creating an XEO Viewer you&#8217;ll probably run into the &#8220;scrollbar issue&#8221;. \u00a0Not all container components (such as panel or section) add scrollbars when the content exceeds the available space. In order for you to assure that your content is &hellip; <a href=\"https:\/\/www.corrspt.com\/blog\/2012\/01\/30\/scrollbars-in-a-xeo-viewer\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,3],"tags":[14],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-tip","category-xeo","tag-xeo-viewer"],"_links":{"self":[{"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":7,"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/85\/revisions\/123"}],"wp:attachment":[{"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}