Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


How to draw a line on a panel?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-27-2008, 06:28 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default How to draw a line on a panel?

Hello,
I have several panels that I show in turn on a form. I would like to separate differents zones in some of them using lines but the panel control does not seem to have a Line ou FLIne method. Do you have an idea in a smart way of drawing lines as a function of the shown panel and remove them for others?

Regards,

Murat
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:07 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 448
Default

The best way I can think of is to use FLine and draw on the forelayer of the Form in the area that the panel occupies.
Either that or if you are only after hrizontal lines, you could try placing a label in the area of the panel you need the line and fill the label with underscores _______

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 10:33 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

Thanks a lot RandomCoder for your suggestions. The first solution seems difficult to me because my panels are not always organized with the same structure and I do not know how I can suppress or move a line drawn in the foreground (if I understand well, they are not objects that we can easily manipulate - like in java forms, for example).
The second suggestion can be a solution. I will check if I can attainan esthetically interesting result with this trick ;-)

Best regads,

Murat
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 09:19 AM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

The tip of Label was very good. But it is enough to put an empty text, a chosen color for the background and a low thickness (1-2 pixels) to get a very good looking line ;-)

Thanks again RandomCoder! :-)
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 03:34 PM
Knows the basics
 
Join Date: Apr 2007
Location: Kindred,ND
Posts: 93
Default

You could also put an image button with a line.bmp that can be invisble or not.

PS I have code that would draw a line and save it to your choice of names let me knoe if I should upload it(its not complete yet.)

Last edited by bdiscount : 02-28-2008 at 03:37 PM.
Reply With Quote
  #6 (permalink)  
Old 02-28-2008, 09:18 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

I have somewhat solved my problem using the empty label trick but I would be happy to benefit from your experience for a more elegant solution
Murat
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #7 (permalink)  
Old 02-29-2008, 03:05 PM
Knows the basics
 
Join Date: Apr 2007
Location: Kindred,ND
Posts: 93
Default Line needed

Here is a program that lets you draw line cicles etc. It is not finished yet, but it allows for graphics to be saved (thanks to dzimage). I am thinking of adding dz's rotation to it. Well I hope you find it useful.
Attached Files
File Type: zip bpaint.zip (18.4 KB, 26 views)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
draw line into image control giannimaione Questions & Help Needed 4 06-03-2008 04:40 PM
simple code: Draw line on the form xiaoye.org Code Samples & Tips 1 05-15-2008 07:15 AM
Draw line on TabControl? Standa Questions & Help Needed 2 01-19-2008 10:38 AM
How to draw a line? RandomCoder Questions & Help Needed 3 08-24-2007 09:11 PM
How to draw into a Panel? BasicUser Questions & Help Needed 1 07-21-2007 06:28 AM


All times are GMT. The time now is 04:05 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0