108 lines
5.0 KiB
HTML
108 lines
5.0 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|||
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|||
|
|
<head>
|
|||
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|||
|
|
<title>Empty Text</title>
|
|||
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|||
|
|
<link href="prettify.css" type="text/css" rel="stylesheet">
|
|||
|
|
<script type="text/javascript" src="prettify.js"></script><script type="text/javascript" src="lang-vb.js"></script><link href="../resources/main.css" media="screen" rel="stylesheet" type="text/css">
|
|||
|
|
</head>
|
|||
|
|
<body onload="prettyPrint()"><div class="placing">
|
|||
|
|
<br><table class="navigation"><tr>
|
|||
|
|
<td class="navigation-previous"><a href="chapter-drag-drop.html"><strong>
|
|||
|
|
« Drag and Drop</strong></a></td>
|
|||
|
|
<td class="navigation-index"><a href="../../../better-thumbnail-browser/documentation.html"><strong>Index</strong></a></td>
|
|||
|
|
<td class="navigation-next"><a href="chapter-focus.html"><strong>Focusing Elements »
|
|||
|
|
</strong></a></td>
|
|||
|
|
</tr></table>
|
|||
|
|
<br><h1>Empty Text</h1>
|
|||
|
|
<div class="banner">
|
|||
|
|
<a href="../../../better-thumbnail-browser.html"><img src="../resources/better-thumbnail-browser-overview.gif" alt="Better Thumbnail Browser" class="ss"></a>
|
|||
|
|
<div class="inside">
|
|||
|
|
<div class="text">Better Thumbnail Browser for .NET (C#, VB) - Image thumbnail viewing and loading control</div>
|
|||
|
|
<span class="dbtn-c dbtn-hilight"><span class="dbtn-w"><a href="../../../betterthumbnailbrowser.exe" class="dbtn">Download</a></span></span>
|
|||
|
|
<span class="dbtn-c"><span class="dbtn-w"><a href="../../../better-thumbnail-browser.html" class="dbtn">More Info</a></span></span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
<p>This feature displays text when Better ListView is empty (does not
|
|||
|
|
contain any items and groups).</p>
|
|||
|
|
|
|||
|
|
<p>A typical use case is file browser, showing "This folder is empty."
|
|||
|
|
text when there are no files to display.</p>
|
|||
|
|
|
|||
|
|
<p>Better ListView can display such arbitrary text with custom font and
|
|||
|
|
color.</p>
|
|||
|
|
|
|||
|
|
<p>The text can be of multiple lines and is automatically trimmed if
|
|||
|
|
there is not enough space.</p>
|
|||
|
|
|
|||
|
|
<p class="images"><img src="empty-text.png"></p>
|
|||
|
|
|
|||
|
|
<p>To add an empty text, simply set the <span class="code">EmptyText</span> property
|
|||
|
|
value. You can simply pass a value of type <span class="code">String</span> (there is an
|
|||
|
|
implicit conversion defined) or <span class="code">BetterListViewEmptyText</span> (which
|
|||
|
|
allows for settings custom font and color).</p>
|
|||
|
|
|
|||
|
|
<p>An explicit conversion of <span class="code">BetterListViewEmptyText</span> to
|
|||
|
|
<span class="code">String</span> is also defined.</p>
|
|||
|
|
|
|||
|
|
<h2>Sample Source Code</h2>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<p>This minimalist sample shows how to easily set an empty text with
|
|||
|
|
default style:</p>
|
|||
|
|
|
|||
|
|
<p><strong>C#</strong></p>
|
|||
|
|
<pre class="prettyprint"><code class="lang-cs">this.listView.EmptyText = "Text displayed on empty list.";</code></pre>
|
|||
|
|
|
|||
|
|
<p><strong>Visual Basic</strong></p>
|
|||
|
|
<pre class="prettyprint"><code class="lang-vb">ListView.EmptyText = "Text displayed on empty list."</code></pre>
|
|||
|
|
|
|||
|
|
<p>This sample show setting empty text with custom font and
|
|||
|
|
color:</p>
|
|||
|
|
|
|||
|
|
<p><strong>C#</strong></p>
|
|||
|
|
<pre class="prettyprint"><code class="lang-cs">// set empty text with custom style
|
|||
|
|
this.listView.EmptyText = new BetterListViewEmptyText(
|
|||
|
|
"Text displayed on empty list.",
|
|||
|
|
new Font("Arial", 12.0f, FontStyle.Bold | FontStyle.Italic),
|
|||
|
|
Color.DarkBlue);</code></pre>
|
|||
|
|
|
|||
|
|
<p><strong>Visual Basic</strong></p>
|
|||
|
|
<pre class="prettyprint"><code class="lang-vb">' set empty text with custom style
|
|||
|
|
ListView.EmptyText = New BetterListViewEmptyText (
|
|||
|
|
"Text displayed on empty list.",
|
|||
|
|
New Font ("Arial", 12.0F, FontStyle.Bold Or FontStyle.Italic),
|
|||
|
|
Color.DarkBlue)</code></pre>
|
|||
|
|
|
|||
|
|
<br><div class="banner">
|
|||
|
|
<a href="../../../better-thumbnail-browser.html"><img src="../resources/better-thumbnail-browser-overview.gif" alt="Better Thumbnail Browser" class="ss"></a>
|
|||
|
|
<div class="inside">
|
|||
|
|
<div class="text">Better Thumbnail Browser for .NET (C#, VB) - Image thumbnail viewing and loading control</div>
|
|||
|
|
<span class="dbtn-c dbtn-hilight"><span class="dbtn-w"><a href="../../../betterthumbnailbrowser.exe" class="dbtn">Download</a></span></span>
|
|||
|
|
<span class="dbtn-c"><span class="dbtn-w"><a href="../../../better-thumbnail-browser.html" class="dbtn">More Info</a></span></span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<table class="navigation"><tr>
|
|||
|
|
<td class="navigation-previous"><a href="chapter-drag-drop.html"><strong>
|
|||
|
|
« Drag and Drop</strong></a></td>
|
|||
|
|
<td class="navigation-index"><a href="../../../better-thumbnail-browser/documentation.html"><strong>Index</strong></a></td>
|
|||
|
|
<td class="navigation-next"><a href="chapter-focus.html"><strong>Focusing Elements »
|
|||
|
|
</strong></a></td>
|
|||
|
|
</tr></table>
|
|||
|
|
<br><table class="footer"><tr>
|
|||
|
|
<td class="footer-title">Better Thumbnail Browser Documentation
|
|||
|
|
</td>
|
|||
|
|
<td class="footer-copyright">
|
|||
|
|
Copyright © 2010-2012 <a href="../../../index.html" target="_blank">ComponentOwl.com</a>
|
|||
|
|
</td>
|
|||
|
|
</tr></table>
|
|||
|
|
</div></body>
|
|||
|
|
</html>
|