نمایش نتایج 1 تا 2 از 2

نام تاپیک: اضافه نمودن یک Link به پایین یک Property Grid

  1. #1

    اضافه نمودن یک Link به پایین یک Property Grid

    با سلام خدمت عزیزان
    من یک Control ساختم
    میخواستم بدونم چطوری میشه به پایین بخش Property یه Link مثل Configure Data Adapter اضافه نمود.

  2. #2
    سلام دوستان پیداش کردم
    این مثال تو msdn بود.تو Refrence مشکل داشت که کاملش کردم
    using System;
    using System.ComponentModel;
    using System.ComponentModel.Design;//must add from reference
    using System.Collections;
    using System.Windows;//must add from reference

    /* This sample demonstrates a designer that adds menu commands
    to the design-time context menu for a component.

    To test this sample, build the code for the component as a class library,
    add the resulting component to the toolbox, open a form in design mode,
    and drag the component from the toolbox onto the form.

    The component should appear in the component tray beneath the form.
    Right-click the component. The verbs should appear in the context menu.
    */

    namespace CSDesignerVerb
    {
    // Associate MyDesigner with this component type using a DesignerAttribute
    [Designer(typeof(MyDesigner))& #93;
    public class Component1 : System.ComponentModel.Component
    {
    }

    // This is a designer class which provides designer verb menu commands for
    // the associated component. This code is called by the design environment at design-time.
    internal class MyDesigner : ComponentDesigner
    {
    DesignerVerbCollection m_Verbs;

    // DesignerVerbCollection is overridden from ComponentDesigner
    public override DesignerVerbCollection Verbs
    {
    get
    {
    if (m_Verbs == null)
    {
    // Create and initialize the collection of verbs
    m_Verbs = new DesignerVerbCollection();

    m_Verbs.Add( new DesignerVerb("First Designer Verb", new EventHandler(OnFirstItemSelected)) );
    m_Verbs.Add( new DesignerVerb("Second Designer Verb", new EventHandler(OnSecondItemSelected)) );
    }
    return m_Verbs;
    }
    }

    MyDesigner()
    {
    }

    private void OnFirstItemSelected(object sender, EventArgs args)
    {
    // Display a message
    System.Windows.Forms.MessageBox.Show("The first designer verb was invoked.");
    }

    private void OnSecondItemSelected(object sender, EventArgs args)
    {
    // Display a message
    System.Windows.Forms.MessageBox.Show("The second designer verb was invoked.");
    }
    }
    }

تاپیک های مشابه

  1. ساختن exe برنامه و تعیین آیکون آن
    نوشته شده توسط dorna1985 در بخش C#‎‎
    پاسخ: 5
    آخرین پست: سه شنبه 09 بهمن 1386, 11:52 صبح
  2. منوی Data Link Property در دلفی
    نوشته شده توسط omid_3952 در بخش برنامه نویسی در Delphi
    پاسخ: 1
    آخرین پست: سه شنبه 30 فروردین 1384, 02:59 صبح

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •