Page 1 of 1

IPAddressGadget Bug

Posted: Mon Nov 24, 2025 1:20 pm
by manu
Hi!

I compiled an old program of mine with PB 6.21 x64.
The IPAddressGadget does not work as expected any more. You can only enter 2-digit IPs, not 3-digit,
when you try to enter a third digit like in 127, you just get a "bing".
I then found out that it depends on the width of the gadget. If it is too narrow, the bug happens.
It worked before with the same widget size, but it was some 5.x version of PB.

This is straight from the IPAddressGadget help, I just changed the width to the 110 pixels (in my old program is was even 100 pixels).

Code: Select all

If OpenWindow(0, 0, 0, 180, 50, "IPAddressGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    IPAddressGadget(0, 10, 15, 110, 20)
    SetGadgetState(0, MakeIPAddress(127, 0, 0, 1))
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
When you remove the 7 from 127, you cannot re-enter it.

Re: IPAddressGadget Bug

Posted: Mon Nov 24, 2025 3:59 pm
by NicTheQuick
Hm, on Linux it works but it also seems just to be simple StringGadget with only numbers and dots allowed. You can type anything into it.

Re: IPAddressGadget Bug

Posted: Mon Nov 24, 2025 4:45 pm
by mk-soft
It's probably been like this for a long time.
Even not PB v5.73 it does not work if the gadget is too narrow.

Re: IPAddressGadget Bug

Posted: Mon Nov 24, 2025 4:48 pm
by Fred
It's a Windows issue as we use the standard IP control

Re: IPAddressGadget Bug

Posted: Mon Nov 24, 2025 4:51 pm
by mk-soft
Windows works perfect :mrgreen:

Re: IPAddressGadget Bug

Posted: Mon Nov 24, 2025 6:13 pm
by Mindphazer
Indeed :lol:

Re: IPAddressGadget Bug

Posted: Tue Dec 02, 2025 8:18 pm
by manu
My old program was using a width of 100 pixels and was compiled with 5.62 x86 on XP, and it works perfectly, even on Win10.
Compiled with 6.21 x86 on Win10, it doesn't work.
Also it is strange, that the gadget is not really too narrow, when I use for example 255.255.255.255 as default, all characters fit,
but it looks asymmectric and when you remove a number digit you cannot re-add it.