Why does Designer on Device change my controls?

Discussion in 'Questions (Windows Mobile)' started by AxelS, Feb 27, 2009.

  1. AxelS

    AxelS New Member

    Hi all,

    I am quite new to Basic4PPC and I am really amazed about its capabilities. I was always looking for such a development environment. I have used Pocketgcc since years, but Basic4PPC is much much easier to use and much more powerful I think.
    Currently, I am using version 5.8 on Windows and on my Eten M800 VGA PPC.
    Now comes a little problem that I have:

    - the controls which I see during the creation process with Designer on the desktop look different from the controls I see in Designer on the PPC. Even worse: when I run the program, the controls again look different. All in all, I have 4 different looking controls (two in the two designer versions and two in the two running programs). This makes pixel-exact form design quite difficult. I have attached the four pictures generated by only ONE and the same .sbp-source below. Especially with the NumberUpDown and the text-control, the differences are visible.
    My question is now: is this a problem of my vga PPC or of the .Net version or of the B4PPC version?

    - another problem is that at least the designer on the PPC keeps changing my inputs unauthorizedly! E.g: I design a good looking form with Designer. Then I close designer and run the program: the forms look differently (as explained above). E.g. controls overlap, have enlarged or have moved by certain pixels or the like. Now I try to correct this in designer (e.g. change the height of a text control or the like) but I see that some of the values I have entered last time in Designer have changed! E.g. a text box went from 22 pixel height to 21 pixels unauthorizedly. Whatever I do, I cannot enforce the correctly looking dimensions with Designer.
    Maybe this is possible when generating the forms in the source code "by hand", but this cannot be intended by the developers, right?

    So does anyone else have these problems? What can I do?

    Thanks in advance,

    Attached Files:

  2. specci48

    specci48 Well-Known Member Licensed User

    Hi AxelS,

    there is a very old post about this behavior in the bug reports section, but Erel has never replied to it. :sign0013:

    Maybe he can answer this question now? :)

  3. Erel

    Erel Administrator Staff Member Licensed User

    Most of Basic4ppc controls are regular windows controls and there are some differences in the appearance between desktop and device controls.

    The other thing you see with the one pixel movement is a bug that happens with VGA devices. This bug will be fixed in the next release.
  4. AxelS

    AxelS New Member

    Thank you for the answers. I wonder, however, wether it is really a VGA problem. It is not that the controls simply move a few pixels. Actually the Properties of the controls change autonomously! E.g. in Designer when I enter 100 in the properties "width" of a TextBox control and save the design, next time I open the Designer, the very same property has changed to 105. And this happens not only to width but also to "height".
    So my question is: is it a bug or a feature that Designer overrides my (carefully selected) choices for width and height?

  5. Erel

    Erel Administrator Staff Member Licensed User

    There is a bug that happens with VGA devices that the width is incremented by 1 pixel.
    I don't see any other changes.
  6. specci48

    specci48 Well-Known Member Licensed User

    Sorry but I didn't get it yet: :sign0104:
    The difference between desktop and device is not the problem here. The NumUpDown control appears different on the device during design time and runtime.
    Why that? Both times its on the device - no desktop. :confused:

  7. Erel

    Erel Administrator Staff Member Licensed User

    I think you are referring to an issue that was fixed in a previous version.
    In the screenshots you can see that in both cases it looks like a device NumUpDown control.
  8. AxelS

    AxelS New Member

    yes, on the PPC the NumUpDown control looks the same in the Designer and during runtime. But on the PC the NumUpDown control looks different in the Designer and at runtime (look at the arrwos for instance).
    For me, different looks is not so much the problem. However, a problem occurs when the behaviour of the controls differ between Designer and during runtime. As you can see in the pictures, for instance, a text field in the Designer may be able to contain more characters than during runtime. I am writing a program, for instance, in which I need a text field which contains EXACTLY 17 characters. While in the Designer this is given, at runtime the same field can only hold 16 characters.

    Last edited: Feb 27, 2009
  9. bdiscount

    bdiscount Active Member Licensed User


    I made ImageButton 24 wide and it changes as to the (I think) the font size, it gets a large as 33 I cut the font to 5 then it only goes to 25. I found the only way to keep the size is to addimagebutton in the code which cuts the help list off at the ".". I hope that gets fixed in the next upgrade
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice