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

DrawItem event

Hi everyone

I'm trying to understand what property or method raises the drawitem event
of a statusbar control. I've been struggling to draw a progressbar, but i
can't make it work.

Thank u all
Dec 19 '05 #1
6 1616
Panos wrote:
Hi everyone

I'm trying to understand what property or method raises the drawitem event
of a statusbar control. I've been struggling to draw a progressbar, but i
can't make it work.

Thank u all


you have to change the drawmode to userdrawn

Chris
Dec 19 '05 #2
That was the first thing i did. I understand the concept of owner drawn
controls, like listboxes or combos. But in my case, i have a For i=... Next
loop and i want to pass the i index to a property (or to a method) in order
to use the graphics class and fill the bar. How can i do it?
"I Don't Like Spam" wrote:
Panos wrote:
Hi everyone

I'm trying to understand what property or method raises the drawitem event
of a statusbar control. I've been struggling to draw a progressbar, but i
can't make it work.

Thank u all


you have to change the drawmode to userdrawn

Chris

Dec 19 '05 #3
Panos wrote:
That was the first thing i did. I understand the concept of owner drawn
controls, like listboxes or combos. But in my case, i have a For i=... Next
loop and i want to pass the i index to a property (or to a method) in order
to use the graphics class and fill the bar. How can i do it?
"I Don't Like Spam" wrote:

Panos wrote:
Hi everyone

I'm trying to understand what property or method raises the drawitem event
of a statusbar control. I've been struggling to draw a progressbar, but i
can't make it work.

Thank u all


you have to change the drawmode to userdrawn

Chris

Are you trying to get the graphics object for a particular panel? Is
that your question?

Chris
Dec 19 '05 #4
No.

I want to know what property or method raises the drawitem event in a
statusbar.
"I Don't Like Spam" wrote:
Panos wrote:
That was the first thing i did. I understand the concept of owner drawn
controls, like listboxes or combos. But in my case, i have a For i=... Next
loop and i want to pass the i index to a property (or to a method) in order
to use the graphics class and fill the bar. How can i do it?
"I Don't Like Spam" wrote:

Panos wrote:

Hi everyone

I'm trying to understand what property or method raises the drawitem event
of a statusbar control. I've been struggling to draw a progressbar, but i
can't make it work.

Thank u all

you have to change the drawmode to userdrawn

Chris

Are you trying to get the graphics object for a particular panel? Is
that your question?

Chris

Dec 20 '05 #5
"Panos" <Pa***@discussions.microsoft.com> schrieb
No.

I want to know what property or method raises the drawitem event in
a statusbar.


Set a breakpoint in the event handler and have a look at the callstack.
Probably it's in the statusbar's OnPaint method.
Armin

Dec 20 '05 #6
I'll check it out.Thank u Armin.

"Armin Zingler" wrote:
"Panos" <Pa***@discussions.microsoft.com> schrieb
No.

I want to know what property or method raises the drawitem event in
a statusbar.


Set a breakpoint in the event handler and have a look at the callstack.
Probably it's in the statusbar's OnPaint method.
Armin

Dec 20 '05 #7

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

Similar topics

0
by: pothik05 | last post by:
I can not make the DrawItem event to work on the CheckedListBox control. I suggestion will be highly appreciated. I have the following code. The code works for ListBox and the second item (Two)...
0
by: Jim H | last post by:
I'm trying to use an owner draw ListBox by subscribing to the DrawItem event to draw my custom control as an item in the ListBox. This event is triggered when I drag the scroll button but NOT when...
0
by: orekinbck | last post by:
Hi There I have wired up an event handler to a combo boxes DrawItem event, and I want to draw a string that is vertically centered in the combo box. At the moment I am doing it like this: ...
1
by: e | last post by:
I have an ownerdrawn listbox that paints items in various colors dependant upon whether or not it has focus, selected, etc. The code that physically paints the items is in the drawItem event, and...
0
by: Paul_Madden via DotNetMonster.com | last post by:
I am handling the Listbox DrawItem event to enable the listbox strings to be displayed in different colours for easy reading. Have set ScrollAlwaysVisible and HorizontalScrollbar to true. I...
2
by: Paul_Madden via DotNetMonster.com | last post by:
I am handling the Listbox DrawItem event to enable the listbox strings to be displayed in different colours for easy reading. Have set ScrollAlwaysVisible and HorizontalScrollbar to true. I...
0
by: Smokey Grindle | last post by:
This is just a wierd one... I am trying to draw the sub items in the drawitem event of the list view in owner drawn mode (because of documented W32 rendering bugs) instead of in two seperate items...
0
ChristopherJohn
by: ChristopherJohn | last post by:
I'm new to this so if this is posted in the wrong area, please advise. I'm using the DrawItem event to change the color of the text for the selected tab of a TabControl with the tabs on the top. ...
1
by: raja11112222 | last post by:
Hi I use more than one button, For all button i use One Customize class .In there DrawItem is used to place picture in button. My problem is for a particular button DrawItem is not called......
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.