Default system cursors in xLabel Thread last updated on 2006-04-18 17:47:01

Posted by member 280260 on 2006-04-09 11:35:18

I've got a label in my theme that acts as a gripper, and I would like the horizontal resize cursor to show up whenever the mouse is over it. Ideally, I would like to use the system's default resize cursor instead of my own. Is there any way I can look that up or get it into an evar?

Posted by member 299300 on 2006-04-16 12:17:55 link

if you set a (label-name)ResizeBorder width, you will get the resize arrow thingies. i suppose you could just set up a large ResizeBorder width to get the desired effect.

Posted by member 280260 on 2006-04-16 14:17:12 link

Doesn't that mean that the label is actually resizable, though. That would be bad.

Posted by member 212670 on 2006-04-16 15:30:21 link

Well, you could constrain the label's width with AutoMinWidth/AutoMaxWidth, stopping it from resizing.

The problem, though, would be if you were using the gripper to move the label, which I suspect you are.

You could use (label)Cursor (pathtocursor), but that would probably go off for the whole label, and not just the area you want.

Posted by member 280260 on 2006-04-16 21:00:09 link

No - I want the cursor for the whole label (it divides an area between two other sets of labels; download agua if you don't understand).

I think the auto min/max width thing should work. Thanks.

Posted by member 280260 on 2006-04-16 21:04:32 link

Correction: doesn't work after all. The label can't be moved when gripped within its resize border.

Posted by member 212670 on 2006-04-16 21:23:58 link

Ya, that's the problem I was mentioning.

Why can't you use: LabelCursor "path to cursor" ?

Posted by member 280260 on 2006-04-17 00:31:09 link

Just aesthetically, I would like to use the native system cursor instead of supplying my own. It's not a major issue, I was just curious if it could be done.

Posted by member 212670 on 2006-04-17 02:00:23 link

But you can use the native system cursors...

LabelNameCursor "$windir$cursors\size3_r.cur"

...for example.

(Note: $windir$ is a winxp system variable. Not sure about its availability in other OSes.)

Posted by member 280260 on 2006-04-17 15:25:45 link

That's all I was asking for.

Just to clarify, I have a cursor set at home with black, mac-style cursors. So the resize arrows should show up black on my computer, but white on someone else's. Will that happen?

Posted by member 5575 on 2006-04-17 15:37:51 link

With the new registry module you can grab the values of each of the cursors selected by the user, and assign the appropriate one to your label. That ought to allow you to get the kind of behavior you desire. The relevant registry keys are here:

HKEY_CURRENT_USER\Control Panel\Cursors

There *are* five different size cursors though (SizeAll, SizeNESW , SizeNS, SizeNWSE, SizeWE), so you'll need to decide which one is appropriate. The rest is left as an exercise for the reader.

Posted by member 212670 on 2006-04-17 19:27:57 link

If the user has "default" or "none" set for their Pointers, it looks like the actual cursor names aren't there.

Posted by member 5575 on 2006-04-17 19:49:53 link

Do we know what the names are for the default cursors then? You could set those to be the fallback values when there is no user-specified cursor, I would think.

Posted by member 212670 on 2006-04-17 21:17:03 link

I don't, but it'd be easy to figure out, prob.

So there, now jqubit has a project. :D

Posted by member 280260 on 2006-04-18 00:01:55 link

To what registry module are you referring?

Thanks a lot for letting me know about that, though. Seems like a lot of trouble to go to for one cursor, but I might as well.

Posted by member 5575 on 2006-04-18 00:13:50 link

Posted by member 280260 on 2006-04-18 17:47:01 link

awesome. thanks.