Source language: Translate to:

Container Margins

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Container Margins

Postby David de Argentina » Wed Oct 17, 2007 9:24 pm

Hi Dave,

I think there are a good idea if we can determine Top, Left, Bottom & Right offset Margin in a container object.

Margins offset horizontal and vertical center the new object placed within the container. I need locate the new object at a non-centered position.

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby HPW » Wed Oct 17, 2007 10:42 pm

How about:

Code: Select all
GetObjectInfo "Container1" "Left" "[ContLeft]"


etc. and then calculate your own new position based on container pos.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby David de Argentina » Thu Oct 18, 2007 10:13 am

Hi Hans-Peter,

Perhaps i didn't explain well...

Container Propierties has Margin Settings

Image

This settings generate an useable internal box.
In some cases, external bands looks as a undesirable border.

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby Neosoft Support » Thu Oct 18, 2007 10:21 am

You can add two or more container objects on to your original container and snap them to the left, right, top and bottom. Adjust the width and height of the containers to create the margins you want. Then add another container snapped to the center and use this container as your main workspace.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby David de Argentina » Thu Oct 18, 2007 11:09 am

Hi Dave,

Yes, I use containers as you said.

But, as I use 2 objects as vertical and horizontal splitters, I need vertical and left margin only.

In this sample, you can see the undesirable red border of the container at the bottom right of the screen:

Image

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby beno » Thu Oct 18, 2007 2:25 pm

Hi David,

When doing resizeable publications you have to do calculations for almost all objects and resize them according to the screen dimensions. Using this idea you´ll get the desired results.

My cent,

beno
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

Postby Neosoft Support » Fri Oct 19, 2007 10:44 am

I think the problem has something to do with the method you're using to create the splitters. Below is a link to a sample publication that demonstrates how to create splitters using only NeoBook objects:

http://www.neosoftware.com/neobook/modules/pubs/singlefile.php?cid=10&lid=46
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby David de Argentina » Fri Oct 19, 2007 11:16 am

Thanks Dave,

Nice Sample !

Every day I learn something new...

Im trying to understand why you resize object with zero value...

SizeObject "Container3" "0" "[DropY]"

I think if object has initial position, it resets the new values...

Thanks again,

David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby HPW » Fri Oct 19, 2007 1:00 pm

When I try the sample and drag the vertical splitter far to the left, there are some artefacts of the text-object left on screen. Seems not to properly redraw the background.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby smartmedia » Fri Oct 19, 2007 1:18 pm

Hi...

I can confirm that...
Also would be nice if drag & drop add in picture object...
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby eddy current » Fri Oct 19, 2007 2:20 pm

To remove the artifacting, just add...

Code: Select all
ShowObject "Container1" "None" "0"
ShowObject "Container2" "None" "0"


...to the end of the Drag & Drag actions tab for the both the vertical and horizontal split bar.

Glen
eddy current
 
Posts: 48
Joined: Mon May 23, 2005 7:24 pm

Postby Neosoft Support » Fri Oct 19, 2007 6:30 pm

Im trying to understand why you resize object with zero value...

SizeObject "Container3" "0" "[DropY]"


Because the container is snapped to the top, NeoBook can't change its width so setting it to zero doesn't do anything.

Glen: Thanks for the tip how to clean up the artifacts. I have uploaded a fixed version of the splitter pub.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby David de Argentina » Tue Oct 23, 2007 12:25 pm

Hi Dave,

Following your Splitter sample, I added a rectangle within each visible container.

Each rectangle had setted as "centered" attribute in order to take the whole container size.

When I drag & drop each Text Splitter, I lost the rectangles.
I tried with ObjectToFront and ShowObject actions, but doesn't work...

Any ideas?

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby Neosoft Support » Tue Oct 23, 2007 2:27 pm

...When I drag & drop each Text Splitter, I lost the rectangles.


It sounds like the plug-in object attached to the rectangle isn't detecting that the rectangles are being resized. What plug-in are you using?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby David de Argentina » Tue Oct 23, 2007 3:24 pm

Hi Dave,

No plugin yet. rectangles only. nothing special.

if you want, i can post the sample, but is your sample with three rectangles within visible containers.

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Next

Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest