Files
componentowl-astro/public/documentation/better-listview/data/chapter-empty-text.html

108 lines
4.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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-embedded-controls.html"><strong>
« Embedded Controls</strong></a></td>
<td class="navigation-index"><a href="../../../quick-start-guide/better-listview/index.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="../../../blog/page/6/index.html"><img src="../resources/overview.gif" alt="Better ListView" class="ss"></a>
<div class="inside">
<div class="text">Better ListView: Ultimate .NET ListView replacement control for WinForms (C#, VB.NET)</div>
<span class="dbtn-c dbtn-hilight"><span class="dbtn-w"><a href="../../../betterlistview.exe" class="dbtn">Download</a></span></span>
<span class="dbtn-c"><span class="dbtn-w"><a href="../../../blog/page/6/index.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="../../../blog/page/6/index.html"><img src="../resources/overview.gif" alt="Better ListView" class="ss"></a>
<div class="inside">
<div class="text">Better ListView: Ultimate .NET ListView replacement control for WinForms (C#, VB.NET)</div>
<span class="dbtn-c dbtn-hilight"><span class="dbtn-w"><a href="../../../betterlistview.exe" class="dbtn">Download</a></span></span>
<span class="dbtn-c"><span class="dbtn-w"><a href="../../../blog/page/6/index.html" class="dbtn">More Info</a></span></span>
</div>
</div>
<table class="navigation"><tr>
<td class="navigation-previous"><a href="chapter-embedded-controls.html"><strong>
« Embedded Controls</strong></a></td>
<td class="navigation-index"><a href="../../../quick-start-guide/better-listview/index.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 ListView Documentation
</td>
<td class="footer-copyright">
Copyright © 2010-2012  <a href="../../../index.html" target="_blank">ComponentOwl.com</a>
</td>
</tr></table>
</div></body>
</html>