I want to know how to resize a gadget to fit it to any Windows font size configuration ?!

I tried this kind of code :
Code: Select all
If OpenWindow(0, 0, 0, 200, 200, "", #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget)
ComboBoxGadget(1, 0, 0, 100, 100)
AddGadgetItem(1, -1, "String #1")
AddGadgetItem(1, -1, "String #2")
SetGadgetState(1, 1)
ResizeGadget(1, #PB_Ignore, #PB_Ignore, GadgetWidth(1, #PB_Gadget_RequiredSize), GadgetHeight(1, #PB_Gadget_RequiredSize))
Repeat
If WaitWindowEvent() = #PB_Event_CloseWindow
Break
EndIf
ForEver
EndIf

Thank you !