Found an issue in SpiderBasic ? Please report it here !
User avatar
kurzer
 
Posts: 50
Joined: Mon May 26, 2014 9:33 am

SetActiveGadget() different behavior in SB/PB

by kurzer Tue Sep 15, 2020 8:29 pm

In SpiderBasic SetActiveGadget() have no effect, if the Window is invisible and then set to visible.
In PureBasic SetActiveGadget() always has the expected effect, no matter if the window is invisible or visible.

Second Issue: After performing SetActiveGadget() for a StringGadget with content, in SpiderBasic the text caret is placed BEHIND the text. In PureBasic the text caret is placed BEFORE the text in the StringGadget.

Code: Select all
OpenWindow(0, 100, 100, 300, 50, "", #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_Invisible)
StringGadget(0, 120, 10, 160, 25, "I have the focus")
ButtonGadget(1, 10, 10, 100, 25, "Oh, a button")


SetActiveGadget(0) ; This have no effect in SpiderBasic but in PureBasic
HideWindow(0, #False)
;SetActiveGadget(0) ; Only this have effect in SpiderBasic

; In PureBasic the textcaret is placed before the Text in the Stringfield   "|I have the focus"
; In SpiderBasic the textcaret is placed behind the Text in the Stringfield "I have the focus|"

CompilerIf #PB_Compiler_OS <> #PB_OS_Web
   Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
CompilerEndIf

Markus
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest