Questions tagged [screen-positioning]

22 questions
131
votes
9 answers

How to center a WPF app on screen?

I want to center my WPF app on startup on the primary screen. I know I have to set myWindow.Left and myWindow.Top, but where do I get the values? I found System.Windows.Forms.Screen.PrimaryScreen, which is apparently not WPF. Is there a WPF…
Marcel B
  • 3,624
  • 2
  • 27
  • 39
7
votes
2 answers

get UIButton inside an UIScrollView absolute screen location

It may be a dumb question, but I can't find an answer to this ... I have an UIScrollView and inside a number of UIButtons. When I press a button, I want to know the screen location of the button. If I use button.frame it gives me the position…
CristiC
  • 22,068
  • 12
  • 57
  • 89
2
votes
1 answer

Get screen coordinates and size of OpenGL 3D Object after transformation

I have a couple of 3D objects in OpenGL in a processing sketch and I need to find out if the mouse is hovering over those objects. Since there is constant transformation I can't compare the original coordinates and size to the mouse position. I…
matteok
  • 2,189
  • 3
  • 30
  • 54
1
vote
2 answers

Constraining window positions in other applications in Cocoa?

I'm relatively new to Cocoa development. I'm developing on Snow Leopard. I have a scenario in mind and I'm curious if the API supports it. I've not been able to find anything about it, so I assume its not possible. But I'm happy to be proved…
user812376
  • 63
  • 4
1
vote
0 answers

JS Tooltip Positioning Flicker

Writing a pure JS tooltip library and have made it work really, really well. No big bells and whistles, just a super lightweight super utilitarian easy-to-customize tooltip. That said, I'm having an issue with updating the position; specifically…
1
vote
0 answers

How can I utilize javascript to get to a specific page position after my page refreshes?

I am new to javascript and more entrenched in the front-end development side. I have found some help here with my question below - Prevent automatic browser scroll on refresh - but I have a different scenerio - one that incorporates a page refresh.…
Jen
  • 21
  • 3
0
votes
0 answers

How do I stop my text from moving up with my table (CSS)?

So i'm coding up a website and i have a table that isn't in the right place. I want to move it up. For context, there's also some text underneath the table. I added margin-top: -150px; in my CSS code for my table to do this but when i did, the text…
TGB314
  • 1
  • 2
0
votes
0 answers

Arranging cards: 2 cards on top. 1 card on the bottom

I have these three cards in a line across the bottom: and I want them to be a triangle: 2 cards on top, 1 card on bottom. like this: c I tried "flex-wrap:wrap" already
0
votes
3 answers

How can I tell if my form is displayed beyond the screen?

So I have two forms, mainform and extraform. extraform is set always moved to the right of mainform when mainform initializes Sometimes mainform takes up both monitors and extraform is pushed off the screen never to be seen again. I would like to…
Malfist
  • 31,179
  • 61
  • 182
  • 269
0
votes
2 answers

C# Winforms: How to get CenterParent with SubForms and ModalForms to function?

I have a MainForm with a subform SubLevel1 within a panel. In SubLevel1 I have another subform SubLevel2 which is opened in a panel within SubLevel1. Now, from SubLevel2 I am opening a ModalForm with ShowDialog() and I want to center it above…
tar
  • 156
  • 2
  • 13
0
votes
2 answers

Get scroll position of ViewCell inside ListView Xamarin Form

I would like to know the scroll position of ViewCell inside the ListView. Tried with various ways but always that gives me 0 value. My intension is to get ViewCell's position in screen. In order to resolve this problem trying to get it's scroll…
0
votes
1 answer

complicated background image positioning for all devices

First of all, I am unable to provide any URL details as I am developing on localhost - for now. However, hopefully, with my clear description below, you may be able to provide a suggestion. :-) I've been trying to positioning an image in the…
0
votes
2 answers

Positioning an image at a specific X and Y location not consistent between tablets

I would like to position an image of a mouse over a wallpaper containing different mouse holes. My the scale type for my wallpaper mouseHole is set to CENTER_CROP I am setting the X and Y positions of my mouse using the following code: int mouseX =…
Pink Jazz
  • 784
  • 4
  • 13
  • 34
0
votes
1 answer

How can I print a countdown clock on screen on the same line and position (i.e. new number overwrited previous)

I have the below code and want to create a countdown clock that counts down from 10 to 9, 8, 7 etc. I want one number to replace the previous on the same line and same position (i.e. you see one number at any time). Is there a print method to do…
newb
  • 11
  • 4
0
votes
5 answers

div has empty space on top with display:inline-block

I'm trying to position two divs .cardbox, .previewbox in a container .cardcontainer next to each other with display:inline-block; For some reason the div on the right side .previewbox has some empty space on top of it that I have no idea how to get…
Miha Šušteršič
  • 9,742
  • 25
  • 92
  • 163
1
2