473,747 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scrollable viewport control creation

Hello,

I want to make a control that has a scrollable Gantt type display (not
really one but will look similar to one) this is going to be custom drawn (i
already have the drawing procedure completed for the overriden onpaint
event) but the problem is this can be a very long scrollable viewport (part
that scrolls inside the control) while the control will be relatively
800x600 in size)... i tried to do this with a panel scrolling inside of a
user contrl but it turned out that the panel has a max size of 32,000 pixels
long, while my timeline bars may be much longer then that... how would you
handle something like this? thanks
Nov 20 '05 #1
5 2158
Draw only what would be seen. Since your control is always going to be 800 x
600, just paint that portion of your display. There is no reason to paint
the whole thing.
"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:eo******** ******@tk2msftn gp13.phx.gbl...
Hello,

I want to make a control that has a scrollable Gantt type display (not
really one but will look similar to one) this is going to be custom drawn (i already have the drawing procedure completed for the overriden onpaint
event) but the problem is this can be a very long scrollable viewport (part that scrolls inside the control) while the control will be relatively
800x600 in size)... i tried to do this with a panel scrolling inside of a
user contrl but it turned out that the panel has a max size of 32,000 pixels long, while my timeline bars may be much longer then that... how would you
handle something like this? thanks

Nov 20 '05 #2
Hi,

I would place a picturebox in the panel with the sizemode set to
autosize. Set the autoscroll property of the panel to true. I would
draw my Gantt type display on a bitmap. Set the bitmap to be the
picturebox's image. The panel will handle the scrolling for you if the
image is bigger than the panel. Hope this helps.
Ken
-----------------

"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:eo******** ******@tk2msftn gp13.phx.gbl:
Hello,

I want to make a control that has a scrollable Gantt type display (not
really one but will look similar to one) this is going to be custom drawn
(i
already have the drawing procedure completed for the overriden onpaint
event) but the problem is this can be a very long scrollable viewport
(part
that scrolls inside the control) while the control will be relatively
800x600 in size)... i tried to do this with a panel scrolling inside of a

user contrl but it turned out that the panel has a max size of 32,000
pixels
long, while my timeline bars may be much longer then that... how would you

handle something like this? thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.0.0 - Release Date: 6/2/2004
Nov 20 '05 #3
it needs to be clickable like a chart in MS project too... so just as a
bitmap im not sure of yet...
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi,

I would place a picturebox in the panel with the sizemode set to
autosize. Set the autoscroll property of the panel to true. I would
draw my Gantt type display on a bitmap. Set the bitmap to be the
picturebox's image. The panel will handle the scrolling for you if the
image is bigger than the panel. Hope this helps.
Ken
-----------------

"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:eo******** ******@tk2msftn gp13.phx.gbl:
Hello,

I want to make a control that has a scrollable Gantt type display (not
really one but will look similar to one) this is going to be custom drawn (i
already have the drawing procedure completed for the overriden onpaint
event) but the problem is this can be a very long scrollable viewport
(part
that scrolls inside the control) while the control will be relatively
800x600 in size)... i tried to do this with a panel scrolling inside of a
user contrl but it turned out that the panel has a max size of 32,000
pixels
long, while my timeline bars may be much longer then that... how would you
handle something like this? thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.0.0 - Release Date: 6/2/2004

Nov 20 '05 #4
Hi Brian,

If you use ownerdraw, you need handle the mouse click by yourself.
You may save the rectangle of each gantt bars, then handle the mouse down
event of the picturebox , check if the cursor position is inside a certain
bar then execute the right methods for this bar click.

Is it helpful to your problem?

Have a nice day!

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.

Nov 20 '05 #5
> I want to make a control that has a scrollable
Gantt type display (not really one but will look
similar to one) this is going to be custom drawn
. . .
the problem is this can be a very long
scrollable viewport (part that scrolls inside the control)
while the control will be relatively 800x600 in size)...
. ..
it needs to be clickable like a chart in MS project too...
so just as a bitmap im not sure of yet...

Would you consider dumping the Picturebox for
another control that gives you a scrollable zoomable
image where you can draw your chart and have each part
of the chart be clickable? This sounds like what
you want. If yes, then take a look at our MetaDraw control
at www.Bennet-Tec.Com. MetaDraw will also allow you to
quickly save and reload the chart, Print, copy to clipboard,
dynamically modify the chart ( hide some lines, change the colors, etc).

Check it out at www.Bennet-Tec.Com

Drop a note back here and let us know if this
works for you, but please also cc me by e-mail
so I know to look her for any reply or follow up
questions.

-----
* * * * Please include a copy of this message with your reply

Jeff Bennett
Je**@Bennet-Tec.Com

* Bennet-Tec Information Systems, Inc
* 50 Jericho Tpk, Jericho, NY 11753
* Phone 516 997 5596, Fax - 5597
* RELIABLE Components Make You Look Sharp!
* TList/Pro * ALLText HT/Pro * MetaDraw *
* Custom Software Development Services Too.
* WWW.Bennet-Tec.Com

=============== ==== =============== ====
"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message news:<ev******* *******@TK2MSFT NGP12.phx.gbl>. .. it needs to be clickable like a chart in MS project too... so just as a
bitmap im not sure of yet...
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi,

I would place a picturebox in the panel with the sizemode set to
autosize. Set the autoscroll property of the panel to true. I would
draw my Gantt type display on a bitmap. Set the bitmap to be the
picturebox's image. The panel will handle the scrolling for you if the
image is bigger than the panel. Hope this helps.
Ken
-----------------

"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:eo******** ******@tk2msftn gp13.phx.gbl:
Hello,

I want to make a control that has a scrollable Gantt type display (not
really one but will look similar to one) this is going to be custom drawn (i
already have the drawing procedure completed for the overriden onpaint
event) but the problem is this can be a very long scrollable viewport
(part
that scrolls inside the control) while the control will be relatively
800x600 in size)... i tried to do this with a panel scrolling inside of a
user contrl but it turned out that the panel has a max size of 32,000
pixels
long, while my timeline bars may be much longer then that... how would you
handle something like this? thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.0.0 - Release Date: 6/2/2004

Nov 20 '05 #6

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

Similar topics

7
11651
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header | +---------------+ | body | | (scrollable) | +---------------+ | footer |
12
1427
by: Csaba Gabor | last post by:
I'd like to have a pic (.jpg - think Map) on a page and a 'viewport' onto that pic, either of whose sizes I could alter by appropriately dragging the element (using, for example, code from the excellent site http://www.walterzorn.com/dragdrop/dragdrop_e.htm) My question is: What is the best design structure for this? Is it an image (in a div), and a second div which will be the viewport (where the div is transparent) AND
2
4093
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using ensurevisible, ie the listview shows a maximum of 6 items and if I want to scroll down one I use the code... listview.ensurevisible(listview.TopItem.Index + 6)
3
1527
by: Les | last post by:
I was wondering if in Visual Basic.net if Microsoft has made it any easier to scroll within a form. In VB 6 to do that required 2 picture windows that would in effect simulate a scrollable viewport. I was wondering what components or etc are available in VB.net that would allow this?? Thanks in advance, Les
0
1443
by: Rune Jacobsen | last post by:
Hi all, In my project I have a control (described in an earlier post) which basically consists of three "subcontrols": One big area where the vital data is displayed (scrollable, since it will usually be larger than the window containing the parent control), a time strip on top of it, and a resource list on the left. Long story short - when someone scrolls the scrollable data control, the time strip and resource lists are hooked to keep...
1
1362
by: Carl | last post by:
Hello, I'm new to asp.net, previously I've been programming in VB6. I'm looking for the functionality of a "scrollable viewport". Can this be done with the standard controls in asp.net? Or are there any (free) custom controls available for this? Tx in advance Carl
3
2409
by: Nathan Sokalski | last post by:
I am looking to create a multi-column list that is scrollable, kind of like a ListBox control, only I need a way to align the columns of text that I will have (I would use spaces, but because the ListBox normally uses a variable-width font, that would not work). Is there a control like the DataList (a control that uses templates and databinding) that displays the items in a scrollable manner? One idea that I had, although it sounds rather...
1
1841
by: Jake Barnes | last post by:
I searched comp.lang.javascript on Google Groups but I didn't find an answer when I searched for "viewport" or "viewport div" or any combination of words using "viewport" so now I think I'm searching for the completely wrong thing. Perhaps someone can tell me what I should be searching for? I've got a div with overflow set to "auto": overflow:auto
0
1137
by: LonelyRanger | last post by:
Hi Everyone, Thanks for your time. My question is based on VB.NET, pictureboxes and a scrollablecontrol. I have several pictureboxes inside a scrollable control. The scrollablecontrol is docked to form1. When i resize the form, then scrollablecontrol resizes aswell. What i need is for the pictureboxes to set themselves up so that they wrap again according to the available width of the scrollable control. I have it already...
0
8818
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9522
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9305
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9222
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8231
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6790
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.