How can i hide a list box, correctly?

For questions about using Classic.

Post » Tue Jul 19, 2011 10:08 pm

In my game i currently use:

Set X to Window.X-(Items.Width)-10 (to hide the list boxes)

Set X Window.ClientX+24   (to reposition the list boxes)

This WORKS fine.....but if i want to drag the game window to another position, the listboxes reappear on the left edge and move across the screen as i am dragging the window?

I have the game window set to position (0,0) on start of layout.
my game is 800x600
my display is 1024x768

Anybody know why.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Tue Jul 19, 2011 10:36 pm

The listbox's position is already relative to the window. The "Window.X" is not needed.
To hide or move off the visible window:
-> ListBox: Set X to 0-ListBox.Width

To show:
-> ListBox: Set X to 24
B
88
S
30
G
89
Posts: 5,106
Reputation: 60,323

Post » Tue Jul 19, 2011 11:49 pm

Thanks a lot Rojohound.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests