PDA

View Full Version : چگونه رو ی یک BOTTON هینت بگذاریم؟



nAVA470
دوشنبه 18 مرداد 1389, 10:41 صبح
برای اینکه رو یک BOTTON هینت بگذاریم(وقتی موس رو ی دکمه قرار میگیرد بدون اینکه چیزی اجر اشود یک توضیحی در مورد عملکرد کلیک دکمه میدهد) از کدام propertyا استفاده کنم.
یا شما چه راه حلی به ذهنتون میرسه؟

Mani_rf
دوشنبه 18 مرداد 1389, 10:51 صبح
در بین ابزار ها کنترلی با نام ToolTip قرار دارد. آن را به فرم اضافه کن، سپس در بین خصوصیات Button خصوصیت جدیدی با نام ToolTip Text اضافه شده که با نوشتن متن در آن ، پس از ایستادن موس روی باتن متن نوشته شده را میبینی

az.heidarzadeh
دوشنبه 18 مرداد 1389, 10:56 صبح
اگه برای ویندوز می خوای یک شیء tooltip تعریف کن و به هر چیزی که می خوای ارتباطش بده ...
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();

// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;

// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");

Reza1607
دوشنبه 18 مرداد 1389, 10:56 صبح
از داخل toolbox یک کنترل tooltip روی فرمت بذار بعد تو قسمت propery دکمه ات قسمت tooltip1 اون متن مورد نظر رو بنویس

Mani_rf
دوشنبه 18 مرداد 1389, 11:00 صبح
اگه برای ویندوز می خوای یک شیء tooltip تعریف کن و به هر چیزی که می خوای ارتباطش بده ...
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();

// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;

// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");

دوست عزیز، این سوال در انجمن VB.Net مطرح شده؛ اما کد های شما به زبان C#‎ است.
کد های خود را پیش از قرار دادن به زبان انجمن مربوطه تبدیل کنید.

az.heidarzadeh
دوشنبه 18 مرداد 1389, 11:23 صبح
معذرت می خوام اصلا حواسم نبود اینم اصلاحش ...



' Create the ToolTip and associate with the Form container.
Dim toolTip1 As New ToolTip()

' Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000
toolTip1.InitialDelay = 1000
toolTip1.ReshowDelay = 500
' Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = True

' Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(Me.button1, "My button1")
toolTip1.SetToolTip(Me.checkBox1, "My checkBox1")