Page 1 of 1
HTML in ListIconGadget
Posted: Thu Oct 01, 2015 10:05 am
by Joestes
I've created a small page where people can upload documents to. I use a listicongadget to show the documents in a list. I would like to add a "download" link to the listicongadget. I tried to use "<a href=...> (etc.) but all I see is the text of the html... Is there a workaround to put html code in the columns of a listicongadget? It DOES works for TextGadget...
Code: Select all
dl$ = Chr(34)+"<html><a href='"+#Url+"/Data/"+LoginFilebase+"/Documenten/"+Docu(i)\Filename+"'>Download</a></html>"+Chr(34)
AddGadgetItem(#lstDocu,-1,Docu(i)\Filename+Chr(10)+FormatDate("%dd-%mm-%yyyy",Docu(i)\Datum)+Chr(10)+Docu(i)\Oms+Chr(10)+Docu(i)+Naam+Chr(10)+dl$)
Re: HTML in ListIconGadget
Posted: Mon Oct 12, 2015 10:35 am
by Fred
I will take a closer look, would be cool if we can get it working as well for listicon items.
Re: HTML in ListIconGadget
Posted: Fri Oct 04, 2024 6:25 pm
by Num3
Any news on this feature?
Re: HTML in ListIconGadget
Posted: Fri Oct 04, 2024 8:23 pm
by Peter
You can use the
ListIconGadgetEx module:
https://github.com/spiderbytes/ListIconGadgetEx
this enables you to render each cell of your ListIconGadget as required. In the example below, I insert the text as HTML in the (TD) cell.
Code: Select all
EnableExplicit
XIncludeFile "ListIconGadgetEx.sbi"
Enumeration
#Window
#ListIconGadget
EndEnumeration
Procedure.s RenderCell(Row, Col, Text.s, TD, ListIconGadget)
! $(v_td).html(v_text);
EndProcedure
OpenWindow(#Window, #PB_Ignore, #PB_Ignore, 300, 200, "RenderCell Demo 4", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(#ListIconGadget, 10, 10, WindowWidth(#Window) - 20, WindowHeight(#Window) - 20, "Col0", 100, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection | #PB_ListIcon_GridLines)
AddGadgetColumn(#ListIconGadget, 1, "Col1", 100)
AddGadgetItem(#ListIconGadget, -1, "SpiderBasic-Forum" + #LF$ + "<a href='https://forums.spiderbasic.com/' target='_blank'>Click here</a>")
ListIconGadgetEx::RenderCell(#ListIconGadget, 1, @RenderCell()) ; we want to render Column 1

Re: HTML in ListIconGadget
Posted: Sat Oct 05, 2024 4:51 pm
by falsam
Hello,
Without a ListIconGadget (
Yes I'm off topic 
), it is possible to create a page containing a list of clickable items.
To do this, I'm using SpiderBasic version 3.01 and its mobile features, which also work with a browser.
Here's the code I'd like you to try out.
Code: Select all
CloseDebugOutput()
If ContainerMobile(#PB_Any, #PB_Mobile_Page, "background-color:lightblue; padding:10px; height:100%; width:100%; font-size:12px;}")
HtmlMobile("<h1>About SpiderBasic</h1> <br>")
HtmlMobile("<p><a href='https://spiderbasic.com/' target='_blank'><b>SPIDERBASIC</b> <i>A Basic to master the web</a></p")
HtmlMobile("<p><a href='https://forums.spiderbasic.com/' target='_blank'>Forum</a></p>")
HtmlMobile("<p><a href='https://www.spiderbasic.com/showcase/onlineviewer/' target='_blank'>Online Viewer</a></p><hr />")
HtmlMobile("<p><a href='https://www.spiderbasic.com/documentation/SpiderBasic.pdf' target='_blank'>SpiderBasic Reference Manual</a></p>")
CloseMobileContainer()
EndIf
Help :
https://www.spiderbasic.com/documentati ... index.html