Jump to content
Sign in to follow this  
Mock

Lua mostrando code em HTML

Recommended Posts

Mock    32
Mock

eu utimamente tou me interessando mais por libs de interface em lua ai entao achei a wxlua e nela tem uma opção pra vc mostrar coisas em HTML :o

entao fiz um mostrador em HTML! :D

 

require("wx")

function doMostrarHtml(page)
 	local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Html")
   local dlg = wx.wxDialog(frame, wx.wxID_ANY, "Mostrador de html")
   local html = wx.wxLuaHtmlWindow(dlg, wx.wxID_ANY,wx.wxDefaultPosition, wx.wxSize(0, 0),                                    wx.wxHW_SCROLLBAR_NEVER)
   local q = wx.wxStaticLine(dlg, wx.wxID_ANY)
   local button = wx.wxButton(dlg, wx.wxID_OK, "Fechar")
   button:SetDefault()
   html:SetBorders(1)
   html:SetPage(page)
   html:SetSize(800,600)
   local topsizer = wx.wxBoxSizer(wx.wxVERTICAL)
   topsizer:Add(html, 1, wx.wxALL, 10)
   topsizer:Add(q, 0, wx.wxEXPAND + wx.wxLEFT + wx.wxRIGHT, 10)
   topsizer:Add(button, 0, wx.wxALL + wx.wxALIGN_RIGHT, 10)
   dlg:SetAutoLayout(true)
   dlg:SetSizer(topsizer)
   topsizer:Fit(dlg)
   dlg:ShowModal()
   dlg:Destroy()
end

ai vc manda executar assim:

doMostrarHtml([[<center>uia</center>Kullfeice]])

e vai mostra uma janelinha mostrando o code em HTML :coolface:

Share this post


Link to post
Share on other sites
Gpwjhlkdcf    21
Gpwjhlkdcf

faz um Mozilla Gaybear navegador com isso agora

faz mostrar HTML em OT :coolface:

Share this post


Link to post
Share on other sites
Mock    32
Mock

eu nao pra q mostra html em ot '-'

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×