Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. PropertyGrid image Selection while Property is ReadOnly Problem

PropertyGrid image Selection while Property is ReadOnly Problem

Scheduled Pinned Locked Moved Visual Basic
graphicscsharpvisual-studiodesign
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VB 8 0
    wrote on last edited by
    #1

    Readonly with Editor is not working as readonly after setting the image and it is working as readonly but not setting the iMage to picture <[ReadOnly](True)> <Editor(GetType(ImageOpenFileDialog), GetType(System.Drawing.Design.UITypeEditor))> _ Public Property BackgroundPicture() As String Public Class ImageOpenFileDialog Inherits UITypeEditor Dim openFileDialog As OpenFileDialog Public Overrides Function EditValue(ByVal context As System.ComponentModel.ITypeDescriptorContext, ByVal provider As System.IServiceProvider, ByVal value As Object) As Object openFileDialog = New OpenFileDialog() openFileDialog.FileName = "" openFileDialog.Filter = "JPEG Images|*.jpg|GIF Images|*.gif|Bitmaps|*.bmp" openFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyPictures If openFileDialog.ShowDialog() = DialogResult.OK Then Return openFileDialog.FileName End If Return MyBase.EditValue(context, provider, value) End Function Public Overrides Function GetEditStyle(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.Drawing.Design.UITypeEditorEditStyle Return UITypeEditorEditStyle.Modal End Function End Class I am creating a readonly Property and if i click i open the Images to select the image . as it is a readonly property i am not able to set teh image to picture box . ---------- Working on Visual Studio 2005 PropertyGrid . I want to lock all the keys not to enter in the propertygrid at the Picture Property like in Visual Basic 6.0 after selecting the image . Only Delete has to work PictureBox -- Picture Property -- (Bitmap) after setting the image so that the user shouldnot change the value Presently i got the (None) in this way . Now i want to set the ReadOnly and only Delete key has to work and i want to set the Picture to PictureBox.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups