Jump to content
Sign in to follow this  
nuxil

A Little Dialog issue.

Recommended Posts

alright i get straight to it.

i need to change a dialogs position from time to time.

depending on what im doing. instead of making many many new classes. i was thinking of somehow changing the current class info's X and Y pos.

i tried using ctrlSetPosition but that didnt go well at all..

so i came up with this idea.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Info

{

idc = 858;

type = 0;

style = 0x01;

colorText[ ]={ 1,1,1,1 };

colorBackground[ ]={ 0,0,0,0 };

font = "Zeppelin32";

sizeEx = 0.02;

lineSpacing = 0;

x = 0.26;

y = 0.26;

w = 0.32;

h = 0.05;

border = 1;

borderSize = 5;

text = "Info";

};

can i do it like something this?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Info

{

idc = 858;

type = 0;

style = 0x01;

colorText[ ]={ 1,1,1,1 };

colorBackground[ ]={ 0,0,0,0 };

font = "Zeppelin32";

sizeEx = 0.02;

lineSpacing = 0;

x = InfoX;

y = InfoY;

w = 0.32;

h = 0.05;

border = 1;

borderSize = 5;

text = "Info";

};

where i change InfoX & InfoY from within a script to change the position of dialog "Info". i tried it like this but it dosent seem to work with putting global variables in there.

is there another workaround?

Share this post


Link to post
Share on other sites

I am pretty sure that a (dialog) class definition can't read variables...a nice try though!

I have never used ctrlSetPosition but I have read about other people who have. Did it not work at all or were the results not what you were looking for. Did you use ctrlCommit along with it? Post your code and let's take a look.

Share this post


Link to post
Share on other sites

right. exaclty what i thought. but the idea was good smile_o.gif

yes i used ctrlCommit along with it.

you dont by any chance remember where you read about this? and who did it? i would like to know

i have some more idea to test out before i post more code.

if i dont get it to work. i post code of the all ways i tried.

Share this post


Link to post
Share on other sites

I'll see if I can find the earlier references of use. I may experiment myself a little.

In the end it may just be easier to define additional dialog classes with controls at different positions, even if only while you continue to look for another solution.

Share this post


Link to post
Share on other sites

All you need is ctrlPosition & ctrlCommit.

You may just have a typo in there, or a wrong control ID.

Check out my Object Browser, where the main menu can be hidden via a button. It's pretty straightforward:

animate.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×