forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Setposition for justified text

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Tue Apr 08, 2003 6:31 am    Post subject: Setposition for justified text Reply with quote

Hi,

I think it's a bug.

I am trying to set the position of a right-justified text and
after that it becomes left-justified.
Could somebody test it and tell me if you have the same ?

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 08, 2003 9:26 am    Post subject: Reply with quote

i think what might be the problem fabian

make sure that your text box is wide enough ie. wider than the length of your text

for example, the following code works ok for me to have the text right justified

Code:
Title 123
  DIALOG CREATE,New Dialog,-1,0,430,241
REM *** Modified by Dialog Designer on 08/04/03 - 19:21 ***
  DIALOG ADD,STYLE,STYLE1,,,R,,
  DIALOG ADD,TEXT,TEXT1,24,0,400,,TEXT1,,STYLE1
  DIALOG SHOW
:Evloop
  wait event
  goto @event()
:Close
   exit


but the following code doesn't right justify
Code:
Title 123
  DIALOG CREATE,New Dialog,-1,0,430,241
REM *** Modified by Dialog Designer on 08/04/03 - 19:21 ***
  DIALOG ADD,STYLE,STYLE1,,,R,,
  DIALOG ADD,TEXT,TEXT1,24,0,,,TEXT1,,STYLE1
  DIALOG SHOW
:Evloop
  wait event
  goto @event()
:Close
   exit


hope this helps

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Tue Apr 08, 2003 9:42 am    Post subject: Setposition for justified text Reply with quote

Hi again, Serge

what I mean is setting the position (on resize).
I want to set it again to the right border of my dialog,
but the position i give as top an left gives the left-justified
position for the text.
At the moment I have to substract the lenght of the text to
set it on the right position.

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 08, 2003 9:55 am    Post subject: Reply with quote

you mean something like this?


Code:
Title 123
  DIALOG CREATE,New Dialog,-1,0,430,241
REM *** Modified by Dialog Designer on 08/04/03 - 19:21 ***
  DIALOG ADD,STYLE,STYLE1,,,R,,
  DIALOG ADD,TEXT,TEXT1,24,0,400,,TEXT1,,STYLE1
  DIALOG SHOW
 
  dialog setpos, text1, 100
 
:Evloop
  wait event
  goto @event()
:Close
   exit


Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Tue Apr 08, 2003 10:07 am    Post subject: Setposition for justified text Reply with quote

Hi Serge,

I tested it

Code:
Title 123
  DIALOG CREATE,New Dialog,-1,0,430,241,RESIZABLE
REM *** Modified by Dialog Designer on 08/04/03 - 19:21 ***
  DIALOG ADD,STYLE,STYLE1,,,R,,
  DIALOG ADD,TEXT,TEXT1,24,@diff(@dlgpos(,w),200),100,,TEXT1,,STYLE1
  DIALOG SHOW
 

  DIALOG SET,TEXT1,Hi Serge
:Evloop
  wait event
  goto @event()
:RESIZE
  dialog setpos, text1, 24,@diff(@dlgpos(,w),200)
  goto evloop
 
:Close
   exit


but you're right - it seems to work.

Bye, Fabian
Back to top
View user's profile Send private message Send e-mail Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Tue Apr 08, 2003 10:16 am    Post subject: Setposition for justified text Reply with quote

the error really occurs only, if you dont specify width for the text:

Code:
Title 123
  DIALOG CREATE,New Dialog,-1,0,430,241,RESIZABLE
REM *** Modified by Dialog Designer on 08/04/03 - 19:21 ***
  DIALOG ADD,STYLE,STYLE1,Arial,24,BR,,
  DIALOG ADD,TEXT,TEXT1,24,@diff(@dlgpos(,w),200),,,TEXT1,,STYLE1,TransPARENT
  DIALOG SHOW
 

  DIALOG SET,TEXT1,Hi Serge"," its @datetime(hh:nn)
 
:Evloop
  wait event
  goto @event()
:RESIZE
  dialog setpos, text1, 24,@diff(@dlgpos(,w),200)
  goto evloop
 
:Close
   exit
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 08, 2003 1:07 pm    Post subject: Reply with quote

you're right about that...if you don't set the width for the text then the text element will only be as wide as the text it contains and hence cannot obe right justified

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group