Page 1 of 1

html class

PostPosted: Wed Jan 24, 2018 10:12 am
by Silvio.Falconi
Fivewin have a class read a html file ?

I not want use activex as this test


Function Mostra_html(cHtml,cPath)
Local ohtmlDlg
Local oActiveX
MemoWrit(cPath+"MiHtml.htm",chtml)
DEFINE WINDOW ohtmlDlg TITLE "Mostra la licenza"
oActiveX := TActiveX():New( ohtmlDlg, "Shell.Explorer.2" )
ohtmlDlg:oClient = oActiveX // To fill the entire window surface
oActiveX:Do("Navigate2",cPath+"MiHtml.htm")
ACTIVATE WINDOW ohtmlDlg
RETUR NIL

Re: html class

PostPosted: Wed Jan 24, 2018 10:14 am
by Antonio Linares
Silvio,

You can read it using MemoRead()

the question is: what to do with it ? :-)

Re: html class

PostPosted: Wed Jan 24, 2018 10:20 am
by Silvio.Falconi
I wish insert on vistamenu instead ctext and I have many items as I send you the message
I cannot use activex for each items

Re: html class

PostPosted: Wed Jan 24, 2018 10:21 am
by Antonio Linares
Silvio,

You may use a TUrlLink control for each element

Re: html class

PostPosted: Wed Jan 24, 2018 11:13 am
by Silvio.Falconi
Yes of cours
but i need yo write a text as....
Sample
There are 6 orders on payment...
And only the words 'oders' must open my function to show the orders
I hope you understood me
I cannot use urlink because it write all words as link

Re: html class

PostPosted: Wed Jan 24, 2018 2:55 pm
by nageswaragunupudi
And only the words 'oders' must open my function to show the orders


Please try
Code: Select all  Expand view

oURL := TURLLink( ................. )
oURL:SetText( "Orders" )
 

Re: html class

PostPosted: Wed Jan 24, 2018 4:21 pm
by Silvio.Falconi
Rao
I explain you
I thinked to create an area into a dialog or window

This area is a "virtual bulletin board" where you can pin and always see the most common and useful information, such as the company's bank details, the telephone numbers of the employees, the telephone numbers of the emergency providers, interesting internet links, etc. .



Image


each items must have an image at left a text on the right
the text can be normal text or text with link
it can be made with vistamenu changed ctext command or add html or richedit memo

I not have problem to make the normal and link text

I have a class to write a Html file




I have problem to insert it on vistamenu item

if you see this topic viewtopic.php?f=3&t=34005&start=0&hilit=dashboard


antonio sad me to use vistamenu but the methd addlitem out a text with underfont and if I make

addItem( cTextHtml) it make all my text (html) with underfont write also the command html

Re: html class

PostPosted: Wed Jan 24, 2018 5:34 pm
by Antonio Linares
Silvio,

You have to modify Class TVistaMenu and TVistaMenuItem or create some new classes inspired on them

Re: html class

PostPosted: Wed Jan 24, 2018 5:53 pm
by Silvio.Falconi
Antonio,
I'm trying to make it
but I have two problems :
1) show the text
2) click on a symbol I insert on the end of item

for the first point ( text ) I 'm trying to found a solution but it is hard the text is go out od the item ( see the picture)

I explain for the second point I add a data aBtnarray

::aBtnarray := C5Simbol( hDC, ::rcItemL1[1]+((::rcItemL1[3]-::rcItemL1[1])/2)-6,::rcItemL1[4] +2, .f., "u", .T. )

if draw a arrow at the end of item see the image ( red circle) it is visible when the user not is over the item

Image

How I can make to click on it and open a popmenu ?

Re: html class

PostPosted: Wed Jan 24, 2018 8:40 pm
by Antonio Linares
Silvio,

Use the function DrawText() as it draws the text inside a rectangle. Look for DrawText inside FWH/source/classes/*.prg

Use a TBtnBmp for the arrow

Re: html class

PostPosted: Thu Jan 25, 2018 10:03 am
by Silvio.Falconi
I tried to insert a btnbmp but it make error

@ ::rcItem[1]+1, ::rcItem[3]-11 BTNBMP oBtnLeft SIZE 16, 16 OF Self
oBtnLeft:hBitmap1 := LoadBitmap( 0, 32750 )
oBtnLeft:bAction := {|| Msginfo() }
oBtnLeft:oFont := ::oWnd:oFont2:hFont


I sent you test test

Code: Select all  Expand view
Application
===========
   Path and name: C:\Work\errori\dashboard\TEST.Exe (32 bits)
   Size: 3,643,904 bytes
   Compiler version: Harbour 3.2.0dev (r1703231115)
   FiveWin  version: FWH 17.12
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 01/25/18, 10:59:05
   Error description: Error BASE/1004  Message not found: TDASHBOARDITEM:OFONT
   Args:
     [   1] = O   TDASHBOARDITEM

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:OFONT( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:NEW( 306 )
   Called from: Source\vistamnu.prg => TDASHBOARDITEM:PAINT( 1337 )
   Called from: Source\vistamnu.prg => TDASHBOARD:PAINT( 744 )
   Called from: Source\vistamnu.prg => (b)TDASHBOARD( 54 )
   Called from: Source\vistamnu.prg => TDASHBOARD:DISPLAY( 0 )
   Called from: .\source\classes\CONTROL.PRG => TDASHBOARD:HANDLEEVENT( 1697 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3356 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:OFONT( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:NEW( 306 )
   Called from: Source\vistamnu.prg => TDASHBOARDITEM:PAINT( 1337 )
   Called from: Source\vistamnu.prg => TDASHBOARD:PAINT( 744 )
   Called from: Source\vistamnu.prg => (b)TDASHBOARD( 54 )
   Called from: Source\vistamnu.prg => TDASHBOARD:DISPLAY( 0 )
   Called from: .\source\classes\CONTROL.PRG => TDASHBOARD:HANDLEEVENT( 1697 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3356 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:OFONT( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:NEW( 306 )
   Called from: Source\vistamnu.prg => TDASHBOARDITEM:PAINT( 1337 )
   Called from: Source\vistamnu.prg => TDASHBOARD:PAINT( 744 )
   Called from: Source\vistamnu.prg => (b)TDASHBOARD( 54 )
   Called from: Source\vistamnu.prg => TDASHBOARD:DISPLAY( 0 )
   Called from: .\source\classes\CONTROL.PRG => TDASHBOARD:HANDLEEVENT( 1697 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3356 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:OFONT( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:NEW( 306 )
   Called from: Source\vistamnu.prg => TDASHBOARDITEM:PAINT( 1337 )
   Called from: Source\vistamnu.prg => TDASHBOARD:PAINT( 744 )
   Called from: Source\vistamnu.prg => (b)TDASHBOARD( 54 )
   Called from: Source\vistamnu.prg => TDASHBOARD:DISPLAY( 0 )
   Called from: .\source\classes\CONTROL.PRG => TDASHBOARD:HANDLEEVENT( 1697 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3356 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TDASHBOARDITEM:OFONT( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:NEW( 306 )
   Called from: Source\vistamnu.prg => TDASHBOARDITEM:PAINT( 1337 )
   Called from: Source\vistamnu.prg => TDASHBOARD:PAINT( 744 )

System

Re: html class

PostPosted: Thu Jan 25, 2018 10:22 am
by Silvio.Falconi
Sorry I saw on classes there is CLASS THtmlPage but not run ?

Re: html class

PostPosted: Thu Jan 25, 2018 4:33 pm
by Antonio Linares
Silvio,

It is only an early prototype

Re: html class

PostPosted: Thu Jan 25, 2018 5:39 pm
by cnavarro
And with this?
Code: Select all  Expand view

oBtnLeft:SetFont( ::oWnd:oFont2 )
 

Re: html class

PostPosted: Fri Jan 26, 2018 9:25 am
by Silvio.Falconi
same error