EditText resizes

YoungHarry

Member
Licensed User
Longtime User
Hi,
I'm having a problem that's driving me crazy!:BangHead:

My app is on a 320x480x160 layout, but looks good on a 540x960x240 Motorola Atrix screen.

I have my help file in a text box on a non visible panel. When I click the Help button the panel is made visible and is brought to the front.
When I click End Help the panel disappears (code below).
The program runs as designed on a 320x480x160 screen, but on the Motorola screen, emulator and device, the help EditText is resized too small.

Can anyone tell me how to force the textbox to stay as it is sized in the designer?
'---------------------------------------
Sub btnExitHelp_Click
PnlHelp.Visible = False
PnlHelp.SendToBack
End Sub
'---------------------------------------
Sub btnHelp_Click
PnlHelp.Visible = True
PnlHelp.BringToFront
txtHelp.Enabled = False
txtHelp.Text = "Help for Calculations" _
& Chr(10) & "Some stuff." _
& Chr(10) & Chr(10) & "More stuff"
End Sub
 

YoungHarry

Member
Licensed User
Longtime User
I thought a Visible/notVisible edittext would be the easiest way. The same thing happens with a labe.

I've uploaded some screenshots.
 

Attachments

  • Help file on 320x480 screen.jpg
    Help file on 320x480 screen.jpg
    73.8 KB · Views: 390
  • Help file on 540x960 screen.jpg
    Help file on 540x960 screen.jpg
    32.2 KB · Views: 370
  • Help file on 540x960 screen-label.jpg
    Help file on 540x960 screen-label.jpg
    30.4 KB · Views: 333
Upvote 0

YoungHarry

Member
Licensed User
Longtime User
Thanks for your answers. However, I seem to have solved the problem by forcing size and position in the code (see below).
Is it normal for the need to reinforce size and position that is designated in the Designer?

PnlHelp.Visible = True
PnlHelp.BringToFront
lblHelp.Gravity = Gravity.CENTER '**added lines
lblHelp.Height=370dip '**
lblHelp.Width=300dip '**
lblHelp.TextColor = Colors.Black '**
lblHelp.Color = Colors.White '**
lblHelp.Text = "Help for Keyseat" _
...etc.
 
Upvote 0
Top