Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) 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: 64
Awards Showcase
Beta Tester 
Total Awards: 1
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 Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
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
__________________
"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: 64
Awards Showcase
Beta Tester 
Total Awards: 1
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: 64
Awards Showcase
Beta Tester 
Total Awards: 1
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
Senior Member
 
Join Date: Apr 2007
Location: Kindred,ND
Posts: 122
Awards Showcase
Beta Tester 
Total Awards: 1
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: 64
Awards Showcase
Beta Tester 
Total Awards: 1
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
Senior Member
 
Join Date: Apr 2007
Location: Kindred,ND
Posts: 122
Awards Showcase
Beta Tester 
Total Awards: 1
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, 40 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 Off
Pingbacks are Off
Refbacks are On

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


All times are GMT. The time now is 08:49 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0