S sconlon Active Member Licensed User Longtime User Sep 13, 2012 #1 I have a popup panel (pnlhmanage with parent activity) containing a number of views (labels and radiobuttons) and two buttons - Ok (btnSave) and Cancel (btnCancel). I set the sizes of all views including the buttons in the designer script as below pnlhmanage.Left =10%x pnlhmanage.Top = 20%y pnlhmanage.Width = 80%x pnlhmanage.Height = 64%y btnSave.Width = pnlhmanage.Width*40/100 btnSave.Height = pnlhmanage.Height*15/100 btnSave.Left = pnlhmanage.Width*5/100 btnSave.Top = rbtnkeep10.Bottom + 2%y btnCancel.Width = btnSave.Width btnCancel.Height = btnSave.Height btnCancel.right = pnlhmanage.Width*95/100 btnCancel.Top = btnSave.Top When I press the Cancel button I do a 'pnlhmanage.visible = false' to hide the panel until it is called again. I do the same instruction when the back key is pressed when I also want the panel to be hidden. The strange thing is that when I next make the panel visible the two buttons are the correct size if it had been hidden via the Cancel button but if it had been made invisible by the Back key being pressed the buttons are smaller in both width and height. This behaviour is repeatable every time. Any ideas what might be causing this? Ta.
I have a popup panel (pnlhmanage with parent activity) containing a number of views (labels and radiobuttons) and two buttons - Ok (btnSave) and Cancel (btnCancel). I set the sizes of all views including the buttons in the designer script as below pnlhmanage.Left =10%x pnlhmanage.Top = 20%y pnlhmanage.Width = 80%x pnlhmanage.Height = 64%y btnSave.Width = pnlhmanage.Width*40/100 btnSave.Height = pnlhmanage.Height*15/100 btnSave.Left = pnlhmanage.Width*5/100 btnSave.Top = rbtnkeep10.Bottom + 2%y btnCancel.Width = btnSave.Width btnCancel.Height = btnSave.Height btnCancel.right = pnlhmanage.Width*95/100 btnCancel.Top = btnSave.Top When I press the Cancel button I do a 'pnlhmanage.visible = false' to hide the panel until it is called again. I do the same instruction when the back key is pressed when I also want the panel to be hidden. The strange thing is that when I next make the panel visible the two buttons are the correct size if it had been hidden via the Cancel button but if it had been made invisible by the Back key being pressed the buttons are smaller in both width and height. This behaviour is repeatable every time. Any ideas what might be causing this? Ta.
Erel B4X founder Staff member Licensed User Longtime User Sep 14, 2012 #2 Can you upload your project? Upvote 0