Source language: Translate to:

buttons position in dimensioning projects

General questions about NeoBook

Moderator: Neosoft Support

buttons position in dimensioning projects

Postby Dixan » Sun May 15, 2016 2:28 pm

Hi,
I set a button or text entry box in a central position but when I change the project dimension it appears in a side, How can I get they keeps in a central position.
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: buttons position in dimensioning projects

Postby StarterPack » Sun May 15, 2016 3:53 pm

Hi Dixan

This is what I've tried...
Lets say your button is 84 Width and 60 Height. To get the middle of the button we have to devided Width and Height in 2
So Width will be 42 and Height will be 30
Now i put this script in " Book Properties/Actions/Resized "

Code: Select all
GetObjectInfo "PushButton1" "Left" "[TextEntry1]"
GetObjectInfo "PushButton1" "Top" "[TextEntry2]"
Math "[WindowWidth]/2" "" "[Result1]"
Math "[WindowHeight]/2" "" "[Result2]"
MoveObject "PushButton1" "[Result1]-30" "[Result2]-42"


Hope this will help
Last edited by StarterPack on Sun May 15, 2016 4:03 pm, edited 1 time in total.
StarterPack
 
Posts: 115
Joined: Fri Feb 19, 2016 6:55 am

Re: buttons position in dimensioning projects

Postby Garic » Sun May 15, 2016 4:02 pm

ksSetOnMoveSize "OnMoveSize"

subroutine (120 is the width of the buttons 40 is the height)
:OnMoveSize
MoveObject "PushButton1" "([PubWidth]-120)/2" "([PubHeight]-40)/2"
Return

Plugin and example: http://my-files.ru/k3d41c
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: buttons position in dimensioning projects

Postby Dixan » Sun May 15, 2016 5:11 pm

StarterPack could you be more specific? Where I should write that script? I don´t know so much about it.
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: buttons position in dimensioning projects

Postby StarterPack » Sun May 15, 2016 11:12 pm

StarterPack could you be more specific? Where I should write that script? I don´t know so much about it.

On Top... Go To
Book/Book Properties/Actions/Resized

Paste it there

Ok but you need 2 simpletext named
[WindowWidth]
and
[WindowHeight]

4 TextEntry boxes named
[TextEntry1]
[TextEntry2]
[Result1]
[Result2]

In each TextEntry boxes properties, uncheck "Enabled" box
Move everything offscreen to the left, except your PushButton1

This will work but i'm also a beginner in this, please also check out what Garic suggest. These guys can help a lot.
StarterPack
 
Posts: 115
Joined: Fri Feb 19, 2016 6:55 am

Re: buttons position in dimensioning projects

Postby Dixan » Sun May 15, 2016 11:49 pm

Wow, I´m so bad student. All of this work perfect when pub start but when max and resize nothing to do. :(
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: buttons position in dimensioning projects

Postby Garic » Mon May 16, 2016 1:46 pm

Dixan,
What is it you can not do
Show your example, what and how it should be.
Maybe we do not understand something.
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: buttons position in dimensioning projects

Postby Dixan » Mon May 16, 2016 2:54 pm

Sorry, I´m Cuban, I am late 50 year in tech, Coul you give me an example how to place a picture in the foro, to give an examle of my problem. I can see the img button but I dont know how to ise it. :(
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: buttons position in dimensioning projects

Postby Gaev » Mon May 16, 2016 3:58 pm

Dixan:

but when I change the project dimension it appears in a side

Are you asking about changing it at Design time ... or at Run time (by the user when he/she changes the size of the window ?

During Design time, you have to do do it manually as there are no "Design time scripts" to be run.

If you don't have to change the size of the buttons/images, you can make this process less tiresome by placing these widgets inside a Container object ... then , when you move the Container to the new center of the window, all the contained widgets move within the Container ... if you choose to do this, read the Help file first about how to use this widget.

If your requirement is for this to be done at Run time, please provide detailed scenario of what you want done.

You need to explain in detail what exactly you need help with. Since we speak different languages, you have to be more verbose (less terse) ... better to provide excessive information rather than less ... include examples (and screen shots where possible/appropriate).
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: buttons position in dimensioning projects

Postby Dixan » Wed May 18, 2016 5:52 am

Whis is the correct form to display an imagen? the foto is in C:/windowed.jpg

"[]http://imagen_file:///C:/windowed.jpg[/]"
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: buttons position in dimensioning projects

Postby dpayer » Wed May 18, 2016 6:57 am

Dixan wrote:Whis is the correct form to display an imagen? the foto is in C:/windowed.jpg

"[]http://imagen_file:///C:/windowed.jpg[/]"



Dixan, there are some fundamentals you are mixing up.

HTTP: is "hypertext transfer protocol" used as a method to move files from a webserver over the internet to another machine.

You are trying to locate a file on your own computer. You need to use the appropriate description of that file. I suggest you do some background study to familiarize yourself with the way windows itself works. Here is a good starting point:

http://www.choicecsi.com/computer-helpf ... le-system/

Also, in this forum, it is always best to show what you have done and then ask for help. It is possible to post code or even whole apps in here if you paste the code of the app (do a copy / paste from a page in NB or open the .pub file in notepad then do a copy /paste into a
Code: Select all
 
section of your post). This is done using the code button above the edit window.

Many of us can appreciate your situation and the learning curve you are experiencing. Don't give up. But you will need to do some study to get where you want to go.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: buttons position in dimensioning projects

Postby Gaev » Wed May 18, 2016 11:24 am

Dixan:

I agree with what David Payer said in the post above.

Whis is the correct form to display an imagen? the foto is in C:/windowed.jpg
"[]http://imagen_file:///C:/windowed.jpg[/]"

phpBB does not facilitate upload/insert of images ... you have to upload it to a server on the internet ... then, use the img tag which references this image ... like this ...

Image
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: buttons position in dimensioning projects

Postby Dixan » Wed May 18, 2016 11:44 pm

How and where can I insert/upload my pictures? I haven´t experience on internet
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: buttons position in dimensioning projects

Postby Garic » Thu May 19, 2016 2:06 am

Dixan, to begin with, do this:
1 go here: http://zagruzitfoto.com
2 in the upper right corner, select the language you want
3 Click the orange button
4 to select an image from your computer
5 Press the green button "Subir"
6 your image loaded on the Internet (the server of site)

if that's all you get, then we will move on.
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

Re: buttons position in dimensioning projects

Postby Dixan » Thu May 19, 2016 7:41 am

Hi Garic I did the first step, I loaded my image on the internet, which will be next step? :D
Last edited by Dixan on Thu May 19, 2016 7:47 am, edited 1 time in total.
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Next

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests