TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.21k stars 385 forks source link

Add forms.resizeComponent() or forms.deleteComponent() to FormsLuaLibrary.cs file #4014

Closed KonkeyDong closed 3 months ago

KonkeyDong commented 3 months ago

I was writing a minimap display for a Gameboy game and realized that there wasn't any way to resize form components such as a pictureBox. I was glancing at the code and noticed that there is a forms.setsize() method defined for resizing the entire form, but none for resizing any of the components.

Because of this, I have no way to resize a form for scaling reasons once I call forms.pictureBox() on a form. I would think that the method signature would be something like:

local component_handler = forms.resizeComponent(componentHandle, width, height)

I think this would be a simple yet handy feature to have as it would allow for more dynamic forms for display purposes. Thoughts?

CasualPokePlayer commented 3 months ago

I'm fairly sure forms.setsize() would in fact work for individual components? There even seems to be specific support for the pictureBox.

YoshiRulz commented 3 months ago

^ And if that wasn't available, you could have used forms.setproperty.

edit: We don't have documentation for what properties exist because it's just all of WinForms by reflection.

KonkeyDong commented 3 months ago

Thanks!

I didn't see where in the Lua Functions page what string values could be used for the forms.setproperty(). I'll provide a list that I was able to find for anyone else that may have stumbled a similar problem while consulting Google:

Important Notes: