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: