How to draw a line on a panel?

Discussion in 'Questions (Windows Mobile)' started by yildi, Feb 27, 2008.

  1. yildi

    yildi Member Licensed User

    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
     
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

    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
     
  3. yildi

    yildi Member Licensed User

    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
     
  4. yildi

    yildi Member Licensed User

    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! :)
     
  5. bdiscount

    bdiscount Active Member Licensed User

    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: Feb 28, 2008
  6. yildi

    yildi Member Licensed User

    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
     
  7. bdiscount

    bdiscount Active Member Licensed User

    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:

Loading...