Community

SCI Programming => SCI Syntax Help => Topic started by: Doan Sephim on January 21, 2021, 09:07:17 AM

Title: SCI0 - Icon location in Print window
Post by: Doan Sephim on January 21, 2021, 09:07:17 AM
The default position on an icon in a window is top left. Is there an easy way to manipulate this? All I really would like to do would be able to center it in the y-axis. Keeping it on the left is fine, but it looks wrong in my death window.
Title: Re: SCI0 - Icon location in Print window
Post by: lskovlun on January 21, 2021, 10:09:30 AM
The default position on an icon in a window is top left. Is there an easy way to manipulate this? All I really would like to do would be able to center it in the y-axis. Keeping it on the left is fine, but it looks wrong in my death window.
How is this different from the other thread which was marked "SOLVED"? Honest question.
Title: Re: SCI0 - Icon location in Print window
Post by: Doan Sephim on January 21, 2021, 10:45:15 AM
The default position on an icon in a window is top left. Is there an easy way to manipulate this? All I really would like to do would be able to center it in the y-axis. Keeping it on the left is fine, but it looks wrong in my death window.
How is this different from the other thread which was marked "SOLVED"? Honest question.
I just didn't know if there was already some way in the code to modify the placement moving it along the y axis. I'm guess there's not and I'll have to customize it a bit.
Title: Re: SCI0 - Icon location in Print window
Post by: lskovlun on January 23, 2021, 02:49:40 PM
Yeah, I was just misreading. You did write y-axis. But the same trick applies; once the dimensions of the dialog box are known (i.e. after adding all the stuff to it and calling setSize:), you reposition the icon.
Title: Re: SCI0 - Icon location in Print window
Post by: Doan Sephim on January 23, 2021, 04:04:41 PM
Yeah, I was just misreading. You did write y-axis. But the same trick applies; once the dimensions of the dialog box are known (i.e. after adding all the stuff to it and calling setSize:), you reposition the icon.
Yup, I basically just made the y-axis number a global variable that I will set when the death menu appears, but will otherwise be set to 4 (what it was before). This may not be the most elegant solution, but it'll do for me