This is difficult to explain, but I have a screen with a bunch of buttons and a loop that automatically places them. However, some of them are placed correctly at first (with the correct width and height settings), but after other buttons are place, they go to the default automatic button size.
Here is a picture:
Most of the buttons are fine but the Vancomycin and Zosyn buttons have been sent back to default size. If I put on a delay, I see that they are placed with the right size at first, but then are changed once later buttons are placed. What causes this?
What Would Cause A Button To Automatically Resize?
-
- Posts: 42
- Joined: Wed Jul 29, 2015 3:53 pm
- My devices: Ipad
Iphone
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: What Would Cause A Button To Automatically Resize?
Maybe they are re-created somewhere with another size.
-
- Posts: 42
- Joined: Wed Jul 29, 2015 3:53 pm
- My devices: Ipad
Iphone
Re: What Would Cause A Button To Automatically Resize?
I don't really think so. Here is the code for creating the button:
The height of the button should always be 21.1167. However, it eventually just goes back to the default width and height.
Is there anything else you could think of that might be happening?
Code: Select all
BUTTON medbutton$(bnum) TEXT TEXT$ AT margin + (pagediv * (divx * startx(COUNT))), graphdiv(LINE) SIZE medbsizex, 21.1167
Is there anything else you could think of that might be happening?
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Re: What Would Cause A Button To Automatically Resize?
Try declaring the height as a variable and using that in your button statement. Check for any other button statements in your code and make sure they all use it. Numbers are very easy to mistype.
The only thing that gets me down is gravity...