Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShowFileIcon property #39

Closed
GoogleCodeExporter opened this issue Jul 28, 2015 · 3 comments
Closed

ShowFileIcon property #39

GoogleCodeExporter opened this issue Jul 28, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

For those who like it fancy, introduce a property whether to display the
file icon.

The proposed solution displays the file icon in thumbnails and details view:

class ImageListView
{
  private bool mShowFileIcon;

/// <summary>
/// Gets or sets whether to display the file icon.
/// </summary>
[Category("Appearance"), Description("Gets or sets whether to display the
file icon."), DefaultValue(true)]
public bool ShowFileIcon
{
   get { return mShowFileIcon; }
   set { mShowFileIcon = value; }
}

public ImageListView()
{
  ...
  mShowFileIcon = true;
}

class ImageListViewRenderer
public virtual void DrawItem
{
  ...
  if (mImageListView.ShowFileIcon)
  g.DrawImage(Utility.GetFileIcon(item.FileName, false), bounds.Right - 18,
bounds.Top + 2);

  // Focus rectangle
  ...
}


Original issue reported on code.google.com by [email protected] on 5 Mar 2010 at 10:19

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants