5
lis/09
0

[.NET] Showing menu on button click

This extremally easy thing, sometimes makes so much problem for someone who don’t know how to use .NET build in functions. As I saw, similar problem implementation in six lines of code (with pretty much calculations) it’s can be easily achived in one line.

Problem: we want to show menu, on center of a button, which was clicked.
Graphic representation:
scroll_menu

Solution:


_context_menu.Show(_button_myButton, new Point(_button_myButton.Width/2, _button_myButton.Height/2));

Komentarze (0) Trackbacks (0)

Brak komentarzy.

Przepraszam, dodawanie komentarzy zablokowane.

Brak trackbacków.