different behavior Desk and PPC

Discussion in 'Questions (Windows Mobile)' started by Put Claude, Jul 26, 2007.

  1. Put Claude

    Put Claude Active Member Licensed User

    Hi,

    On Desk : text in a label will return at the end of the label...
    On PPC : text in a label will NOT return at the end of the label...
    Than, I have only one line with missing the rest behind the label edge.
    Is there a workaround so I have a label-looking textfield with all my text in it on PPC?
    No multiline textbox please, because of the vertical scrolbar.

    Put Claude Belgium
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    If I remember correctly, labels do wrap the text if it is longer than the label width (assuming that the height is enough).
    You can also use Form.DrawString to draw the text in a specific box.
     
  3. Put Claude

    Put Claude Active Member Licensed User

    Hi Erel,

    On my pocket Ipaque hx2110 mobile 3SE, the labeltext will not wrap...
    Also on my Acer n300 mobile 5 , the labeltext will not wrap...
    On Desktop , the labeltext always wrap...
    There is no workaround to get something like a label with wrapped text in it.
    So, I use the multiline textbox...

    Put Claude Belgium
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I've checked it again (on a WM5 device with .Net CF 1.0 and with .Net CF 2.0) and the label's text do wrap.
    Can you upload a simple application that demonstrates the wrong behavior?
     
  5. specci48

    specci48 Well-Known Member Licensed User

    Hi Erel,

    my uploaded file shows the different behaviour.

    The difference is:
    - on the desktop, the word wrap is done even in the middle of a very long word
    - on the device, the word wrap is only done AFTER a word (when a space is reached)

    So if there is a very long word to show, the long word may be truncated on the device :(


    specci48
     

    Attached Files:

    • Wrap.sbp
      File size:
      578 bytes
      Views:
      21
  6. Put Claude

    Put Claude Active Member Licensed User

    Label Wrap

    Hi Erel,

    Modify a little (only a button) so you can easy test the thing.
    I first put text in 'SerBuf', that is the buffer that hold the NMEA sentence or hold a text string of choise, from this point: in the program,
    You can get a sentence from GPS into the buffer, by then, the buffer in the label will not wrap on pocket.
    Putting text in the buffer by testbutton, buffer will wrap on pocket...
    Try many things... even placed label filling on other places, also disconnect OnCom and close Comport before Label filling, nothing... I wil be damed to use the multiline textbox :)

    Put Claude Belgium
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    I guess (I didn't check it yet) that the label doesn't wrap the text that comes from the gps because it do not include any spaces.
     
Loading...