What Would Cause A Button To Automatically Resize?

Post Reply
the_wesley_watkins
Posts: 42
Joined: Wed Jul 29, 2015 3:53 pm
My devices: Ipad
Iphone

What Would Cause A Button To Automatically Resize?

Post by the_wesley_watkins »

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:
image.jpg
image.jpg (356.45 KiB) Viewed 1881 times
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?

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: What Would Cause A Button To Automatically Resize?

Post by Mr. Kibernetik »

Maybe they are re-created somewhere with another size.

the_wesley_watkins
Posts: 42
Joined: Wed Jul 29, 2015 3:53 pm
My devices: Ipad
Iphone

Re: What Would Cause A Button To Automatically Resize?

Post by the_wesley_watkins »

I don't really think so. Here is the code for creating the button:

Code: Select all

BUTTON medbutton$(bnum) TEXT TEXT$ AT margin + (pagediv * (divx * startx(COUNT))), graphdiv(LINE) SIZE medbsizex, 21.1167
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?

User avatar
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: Canada
Contact:

Re: What Would Cause A Button To Automatically Resize?

Post by rbytes »

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...

Post Reply