PDA

View Full Version : delete button out side of frame?



Gordon228
May 23rd, 2017, 07:36
hello a gen i was wondering if i can move the delete button that spawns with an entry like the inventory delete button to remove items can be out side of the main frame if so how would one go about this? this will help me in more ways then one for my project. thank you for your time.

Trenloe
May 23rd, 2017, 15:04
It's the button_idelete control in <windowclass name="char_invitem"> in campaign\record_char_inventory.xml

The issue you're going to have is that it uses "relative" anchoring, so other controls are anchored off it. You'll be able to use a positive offset to move the control to the right, but the next control that has relative anchoring involving this control will also need to have it's offset changed to reflect button_idelete moving.

Read up on relative anchoring here: https://www.fantasygrounds.com/modguide/windowing.xcp

EDIT: But, as Ken L says, you'll not be able to move the position of these outside of the window they're in - as controls have to be within the bounds of the windowclass. To move outside of the bounds of the windowclass, the control would need to be in another windowclass and you'll get all sorts of problems trying to do it that way.

In theory, you could create a windowclass with large bounds, but with a smaller frame - giving the impression the window is smaller too. Then you'd be able to move the delete button outside of the bounds of the frame, but still within the bounds of the windowclass.

Ken L
May 23rd, 2017, 15:32
I don't think so, the element is contained within that window and as you flex the window it'll contain its elements. I believe you'll need a separate frame that anchors relative to the window in question, but I recall that most of the script-lets use a parent reference system so most of those will need to be changed as you'll effectively be pulling them out of the 'parent' container.

Gordon228
May 23rd, 2017, 17:10
thank you i will see what i come up with and this is something i need to do or things will be small. too small to read off hand.

Trenloe
May 23rd, 2017, 17:34
FYI - if you don't have space then you don't have to use the delete buttons. These buttons are a relatively new feature in Fantasy Grounds. Before that (and is still used now), records were deleted using a right-click menu. You could use that - it's probably enabled by default anyway. Right-click on a record and select "delete".

Gordon228
May 23rd, 2017, 17:43
true it is there but the main problem is the button to go to the stats page aka the shortcut button. as there is no easy way to get into that window i was hope to kill 2 bird with one stone so to speak.

Edit: but i have a way and since thats the only button i need it will be easy.

Edit 2: you can see the finished version and it works now i just need to align some text and that part is good to go.

Trenloe
May 23rd, 2017, 18:17
The FG standard for links is to have them either on the far right or the far left, not in the middle. You'll probably want to reduce the size of the font you're using for the entries in the windowlist - it will make it look less cluttered.

Gordon228
May 23rd, 2017, 19:11
well it works and how do you change the font size? thats something i always wondered about. lol :)

Edit: fount it.