473,325 Members | 2,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

MeasureItem

Hi all,

I made two usercontrols (a flat combobox and a contextmenu with icons). Both
of them have a procedure "Protected Overrides Sub OnMeasureItem". They work
fine when using apart from each other.
There is a problem though when I set the ContextMenu property of a flat
combo to a contextmenu with icons. When I rightclick the combobox (in order
to show the contextmenu) the OnMeasureItem of the combobox is fired for each
item in the contextmenu. The OnMeasureItem of the contextmenu is not fired
at all. The result is a way to tiny contextmenu that doesn't show any of the
items.

What is happening here and what can I do about it?
Thanks in advance for any information.

Stefan.
Jul 21 '05 #1
0 1230

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lex | last post by:
As you may have seen in other posts I have a C# app that has custom shortcuts so I need to OwnerDraw my MenuItems. Thanx to vJ and Mick for the tips so far. I am almost there :-) My last (I...
5
by: Rob Mayo | last post by:
How can I force a MeasureItem message for an owner-dramn menu item? Here is the dilemma. I wrote a lovely little Component for owner-drawing all the menus on a form and making them look like...
1
by: Patty O'Dors | last post by:
Hi I have some code to create an ownerdrawn listbox (derived), and when I add an item to it, the bold text of the first item (the title, 'Collections and Maturities') mysteriously seems to get...
0
by: MrNobody | last post by:
Hey I think I have a problem with the MeasureItem event on a MenuItem. I am dynamically changing the text in the MenuItem, and if this text becomes longer than any text in the original menu, it...
1
by: Dan Bass | last post by:
I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The...
0
by: Fabrizio | last post by:
I've implemented an ownerdraw menu but when I change the Text property of the item MeasureItem is not fired so I can't change the Width of the Item. So I create a new property Text but I can't...
2
by: S. Viswanathan | last post by:
Hi All, I want to update the statusbar when mouse over on the each menu item. How to write the code for this. Is there any specific events in menu? Thanks and Regards S. Viswanathan
0
by: Stefan De Schepper | last post by:
Hi all, I made two usercontrols (a flat combobox and a contextmenu with icons). Both of them have a procedure "Protected Overrides Sub OnMeasureItem". They work fine when using apart from each...
2
by: Mosfet | last post by:
Hi, I am currently writing a graphical control(a list control) that can display a picture followed by some text and to do so I first calculate an item height and then I really draw. I was...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.