473,397 Members | 1,961 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,397 software developers and data experts.

OwnerDrawn List Box

Hi

I am making a new listbox which will give me the ability to put in a title on one line, a number on the side for each item, and a description that would textwrap if the string length is bigger then the width of the listbox. I am having the problem when it comes to measuring the itemheight. I have added two items which are identical, but when the MeasureItem runs the first item height is 318 and the second one is 79. Can anyone help me

Thank you

Ilya
Nov 15 '05 #1
1 1319
Ok, got a new problem now. Before I inherited form the Listbox control and never called base.OnMeasureItem and base.OnDrawItem. I have done that, but now when I have a string that is very large and the 2nd string is smaller they do not properly set the itemheight, but when I call out a messagebox to display the item height inside the OnMeasureItem routine the itemheight is correct. As soon as i get the messagebox.show out of the OnMeasure routine then the height is not correct again. Any suggestions

Thank you

Ilya
Nov 15 '05 #2

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

Similar topics

0
by: Martin Streller | last post by:
Hello, The code below represents a simple ownerdrawn, Listview class in C#. Its purpose is to avoid the flicker of the MS ListView. So I can't fall back to their one. Does anybody know why I...
4
by: Beeeeeeeeeeeeves | last post by:
I have an ownerdrawn combo box which I am drawing with an image and some text, this is all working beautifully apart from the difference in the Brush I have to draw the background and the text with...
1
by: Beeeeeeeeeeeeves | last post by:
I have an ownerdrawn combo box which I am drawing with an image and some text, this is all working beautifully apart from the difference in the Brush I have to draw the background and the text with...
1
by: mnsindhu74 | last post by:
hi I am creating an ownerdrawn combo box. I will need to display icons/images in the edit portion of the combobox. I retreived the handles of Edit and List portions with ComboBoxInfo structure....
0
by: Andrew Baker | last post by:
Have a look at the code below. It's a really simple example where I have added two controls to a form, a textbox and a combo box. Both add owner drawn context menus to the controls, but the...
0
by: Dave | last post by:
Does anyone have a simple example of setting up an ownerdrawn statusbarpanel control in c++ .NET? It would be greatly appreciated. Thanks Dave
1
by: Danny van Kasteel | last post by:
Hi, I'm trying to make an ownerdrawn ListBox that can display a custom graphic and 2 lines of text per item. I have tried to set the following properties on a standard ListBox control: ...
1
by: Danny van Kasteel | last post by:
Hi, I'm having some trouble drawing items in controls that I've marked as ownerdrawn. I'm currently developing an application that has ownerdrawn statusbar panels, and a listbox that contains...
3
by: André Nogueira | last post by:
Hi there! I have successfully create my own ownerdrawn menus. However, I decided to add some code for the menus to detect if their parent is a MainMenu object and, if it is, as it is the menuitem...
1
by: Dino Buljubasic | last post by:
Hi, My application has a menu with some of the menu items that have their own menu items. By default, VB will add a black right rectangle when a menu items has its own menu items. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.