SpiderBasic Library - List of new functions

Share your advanced knowledge/code with the community.
User avatar
RSBasic
Posts: 36
Joined: Mon Oct 15, 2018 1:17 pm
Location: Berlin
Contact:

Re: SpiderBasic Library - List of new functions

Post by RSBasic »

ImageImageImageImageImage
User avatar
RSBasic
Posts: 36
Joined: Mon Oct 15, 2018 1:17 pm
Location: Berlin
Contact:

Re: SpiderBasic Library - List of new functions

Post by RSBasic »

With this function you can move gadgets to another window: https://www.purebasic.fr/german/viewtop ... 00#p349500
ImageImageImageImageImage
User avatar
RSBasic
Posts: 36
Joined: Mon Oct 15, 2018 1:17 pm
Location: Berlin
Contact:

Re: SpiderBasic Library - List of new functions

Post by RSBasic »

With this function you can open an internal or external page in a popup window: https://www.purebasic.fr/german/viewtop ... 05#p349505
ImageImageImageImageImage
User avatar
RSBasic
Posts: 36
Joined: Mon Oct 15, 2018 1:17 pm
Location: Berlin
Contact:

Re: SpiderBasic Library - List of new functions

Post by RSBasic »

With this function you can add and change a placeholder text for StringGadget, EditorGadget, SpinGadget, DateGadget and ComboBoxGadget: https://www.purebasic.fr/german/viewtop ... 44#p349544
ImageImageImageImageImage
User avatar
Arbrakaan
Posts: 91
Joined: Mon Feb 24, 2014 10:54 pm
Location: Geneva
Contact:

Re: SpiderBasic Library - List of new functions

Post by Arbrakaan »

Thanks for this great library RSBasic ! :)
hoerbie
Posts: 96
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

Re: SpiderBasic Library - List of new functions

Post by hoerbie »

Hi RSBasic,

thanks for your work, I found an error in the first post, the Link for "Preference....Create, load, edit and save setting file:" is wrong, same in German PB forum.

And if you like, I put a small code (modified from your codes) for setting the missing line-height of gadgets in the bug forum.

Regards, Hoerbie
magg
Posts: 6
Joined: Wed Mar 15, 2023 6:57 pm

Re: SpiderBasic Library - List of new functions

Post by magg »

With this code you can make Debug window always float at top/right when resize main browser:

Code: Select all

!window.addEventListener("resize",function(){
!	spider_ResizeWindow(spider.debug.window, spider_DesktopWidth() - spider_WindowWidth(spider.debug.window, 1)-10, 10, -0xFFFF , -0xFFFF)
!}) 
EDIT!
I add keyboard shortcut ESC to hide/show debug window.

Code: Select all

Procedure DebugEscape()
	Static Visible = #True
	Define DebugWin
	! v_debugwin = spider.debug.window;
	If Visible = #True
		HideWindow(DebugWin,1)
		Visible = #False
	else
		HideWindow(DebugWin,0)
		Visible = #True
	endif
EndProcedure
macro SetStickyDebug()	;make debug window float at edge
	!window.addEventListener("resize",function(){
	!	spider_ResizeWindow(spider.debug.window, spider_DesktopWidth() - spider_WindowWidth(spider.debug.window, 1)-10, 10, -0xFFFF , -0xFFFF)
	!}) 
	!window.addEventListener("keyup", function(event) {
	!    if (event.keyCode === 27) {
			DebugEscape()
	!    }
    !});	
EndMacro

SetStickyDebug() ;to use it
Last edited by magg on Sat Apr 01, 2023 6:06 am, edited 1 time in total.
Dirk Geppert
Posts: 281
Joined: Fri Sep 22, 2017 7:02 am

Re: SpiderBasic Library - List of new functions

Post by Dirk Geppert »

Good to know, also for other windows like this. Thx magg!
Post Reply