Tip

Table of view and action icons

After designing a detailed Web-based status page, a client wanted to switch to using a single row of icons instead of several rows of text status messages. All the ones I picked, they didn't like, so I threw together a quick agent to let them pick them out. The result is a nice printed page to see all the view and action icons.


Sub Initialize
 Dim x As Integer
 Print |<table>|
 Print |  <tr valign=top>|
 Print |    <td>|
 Print |     <table border=1>|
 Print |       <tr>|
 Print |         <td colspan=10 align=center><font face="arial" size="-1">|
 Print |           <b>Action Icons</b><br>Web Usage:<br>|
 Print |           <img src="/icons/actn000.gif" width=21 height=21></font>|
 Print |         </td>|
 Print |       </tr>|
 'Loop thru the action icons...
 For x = 1 To 155
   If Right$(Cstr(x),1) = 1 Then Print |<tr>| 'Open row...
   Print |<td align=center>|
   Print |  <img src="/icons/actn|| & Format$(x,"000") & |.gif" width=21 height=21 vspace=3 hspace=4 border=0><br>|
   Print |  <font face="arial" size="-2">| & Format$(x,"000") & |</font>|
   Print |</td>|
   If Right$(Cstr(x),1) = 0 Then Print |</tr>| 'Close row...
 Next x
 Print |     </table>|
 Print |   </td>|
 Print |   <td>  </td>|
 Print |   <td>|
 Print |     <table border=1>|
 Print |       <tr>|
 Print |         <td colspan=10 align=center><font face="arial" size="-1">|
 Print |           <b>View Icons</b><br>Web Usage:<br>|
 Print |           <img src="/icons/vwicn000.gif" width=12 height=11></font>|
 Print |         </td>|
 Print |       </tr>|
 'Loop thru the view icons...
 For x = 1 To 176
   If Right$(Cstr(x),1) = 1 Then Print |<tr>| 'Open row...
   Print |<td align=center>|
   Print |  <img src="/icons/vwicn|| & Format$(x,"000") & |.gif" width=12 height=11 vspace=5 hspace=7 border=0><br>|
   Print |  <font face="arial" size="-2">| & Format$(x,"000") & |</font>|
   Print |</td>|
   If Right$(Cstr(x),1) = 0 Then Print |</tr>| 'Close row...
 Next x  
 Print |     </table>|
 Print |   </td>|
 Print | </tr>|
 Print |</table>|
End Sub

This was first published in September 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.