Card vs. background setting?

Using SuperCard and the Runtime Editor... working with windows, backgrounds, cards and menus.

Card vs. background setting?

Postby drpitcairn » Mon Apr 17, 2017 9:31 am

I know this is a really basic question but until now I have been using ModuloPI and with the new update have to learn new ways of doing settings. So in the current update when I made a new project and make it a standard card I am having difficult with resizing it. I set it to "autoresize" and the same with the background but when I do drag the right lower corner out the card stays smaller with a gray area (background) appearing instead. I see how I can go in and click the option to make the card and background the same size but it does not stick, is a one time adjustment. Do I have to put a script in? Or is there a setting for a permanent relationship between the card and background so it can be resized at any point without having to do a manual adjustment?

Thanks,
— Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Card vs. background setting?

Postby codegreen » Mon Apr 17, 2017 10:22 am

I think the property you're looking for here is the autobacksize...

HTH,
-Mark
codegreen
 
Posts: 1517
Joined: Mon Jul 14, 2008 11:03 pm

Re: Card vs. background setting?

Postby drpitcairn » Mon Apr 17, 2017 11:09 am

I did that one too. Set autobacksize for background and set autoresize for window, I think there is a liveresize as well. In any case I set all of them that I could to allow resizing and it makes no difference. When I drag the window out, gray area appears.
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Card vs. background setting?

Postby drpitcairn » Sun Apr 23, 2017 4:52 pm

I have not had any advice on this yet, so will try one more post. Don't know if this is a bug and I should report it. Am inlined to think I just don't fully understand how to do it without Modulo PI. I am attaching a picture which shows how dragging out the window reveals the gray background, even though the background setting is set for "autoresize." Can anyone let me know if I have set it right? Should I report as a bug?
SC window.sc45.gif
SC window.sc45.gif (59.22 KiB) Viewed 719 times


— Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Card vs. background setting?

Postby codegreen » Sun Apr 23, 2017 10:00 pm

I just tested this:

- Launched SC 4.73

- Selected New Project… from the File menu, clicked Save

- Pressed Cmd-M to open Message Box

- Typed set the autobacksize of this bg to true and hit Return

- Clicked in window's grow box and resized it

The background resized itself to match the new window size, no gray area visible.

Are you saying this is not what you see when you repeat these steps?

-Mark
codegreen
 
Posts: 1517
Joined: Mon Jul 14, 2008 11:03 pm

Re: Card vs. background setting?

Postby drpitcairn » Mon Apr 24, 2017 4:29 pm

Yes, this works. I assume this has to be done with every new project? Reason I did not know is Modulo PI does not require this. When you make a new project apparently that is the default setting already.
I appreciate your help.

— Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Card vs. background setting?

Postby codegreen » Mon Apr 24, 2017 5:17 pm

Presumably it installs a newBackground handler in a frontScript or backScript that sets the autobacksize of the target.

You can do the same yourself easily enough (see the User tab in SuperCard's preferences) if you like...

-Mark
codegreen
 
Posts: 1517
Joined: Mon Jul 14, 2008 11:03 pm

Re: Card vs. background setting?

Postby drpitcairn » Tue Apr 25, 2017 5:44 am

I think partly what was confusing me was that I had manually set to autoresize so I thought that would basically set it.
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Card vs. background setting?

Postby codegreen » Tue Apr 25, 2017 8:39 am

For future reference, xtalk object properties don't work that way. No matter how many times you set an object property, its default value (which is inherited by all new instances) remains unchanged.

However if you paste this at the end of your User script (in SC prefs) and then check User Shared Script Enabled, you won't have to set this one again manually each time you create a background:

Code: Select all
on newBackground
  set the autoBackSize of this bg to true
  pass newBackground
end newBackground

You can easily customize the default value for any object-level property this way...

HTH,
-Mark
codegreen
 
Posts: 1517
Joined: Mon Jul 14, 2008 11:03 pm

Re: Card vs. background setting?

Postby drpitcairn » Tue Apr 25, 2017 9:13 am

Lovely. Will do this.
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona


Return to SuperCard Basics

Who is online

Users browsing this forum: No registered users and 1 guest

cron