简体   繁体   中英

Embed a control inside a Tooltip in WinForms

is it possible to add a control to a tooltip? What im trying to achieve is a tooltip that shows some example data in a dataGridview inside the tooltip.

What I have done so far is the following:

  1. I have created a table with some settings (dataGridview with Name (text), Type (text), Example (image), and Setting (comboBox).

ExampleImage

  1. I managed to show a tooltip with the example as string onMouseOver the example image.

I'd like to embed another dataGridview in the tooltip because some examples are in table form.

Tooltips are very limited.

The solution is to create a custom tooltip. You do a form and make it look like a tooltip and you put on it what you want.

You can make it look exactly like a tooltip an you can show it and hide it with the event handlers on your datagrid.

我的解决方案是使用一个自定义面板,该面板显示在光标位置,并在计时器结束后淡出。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM