Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing string characteristics while building
Message
De
14/07/2016 19:18:51
 
 
À
13/07/2016 09:27:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01638321
Message ID:
01638420
Vues:
85
an activeX ie browser can be used to view any formatted text from a table,grid.....to a richtext html
in grid can use the event AfterRowColChange to view what you want to view.
this is a test example.
Publi yform
yform=Newobject("asup")
yform.Show
Read Events
Retu

Define Class asup As Form
	Top = 0
	Left = 0
	Height = 309
	Width = 883
	Caption = "a form test for UT"
	Name = "Form1"

	Add Object grid1 As Grid With ;
		Height = 240, ;
		Left = 1, ;
		Top = 12, ;
		Width = 432, ;
		Name = "Grid1"

	Add Object olecontrol1 As OleControl With ;
		Oleclass="shell.explorer.2", ;
		Top = 12, ;
		Left = 444, ;
		Height = 288, ;
		Width = 433, ;
		Name = "Olecontrol1"

	Procedure my
	Lparameters nColIndex
	Sele ycurs
	Local m.myvar
	TEXT to m.myvar textmerge noshow
		<body bgcolor=black  oncontextmenu="return false;" scroll="no">
		<img src="<<home(1)+'GRAPHICS\GIFS\MORPHFOX.GIF'>>" width=48px height=48px
		<p style="color:red;">1.<<eval(field(1))>>  </p>
		<p style="font-size:28px;color:cyan;">2.<<eval(field(2))>> </p>
		<p style="font-family:segoe script;font-size:28px;color:red;">3.<<eval(field(3))>> </p>
		<p style="font-size:20px;color:gold;">4.<<eval(field(4))>> </p>
		</body>
	ENDTEXT
	Local m.lcdest
	m.lcdest=Addbs(Sys(2023))+"ytemp.html"
	Strtofile(m.myvar,m.lcdest)
	Thisform.olecontrol1.Navigate(m.lcdest)
	Endproc

	Procedure Init
	Set Safe Off
	Endproc

	Procedure Destroy
	Dele File Addbs(Sys(2023))+"ytemp.html"
	Clea Events
	Endproc

	Procedure grid1.Init
	Sele  * From Home(1)+"samples\data\customer" Into Cursor ycurs
	With This
		.RecordSource="ycurs"
		.SetAll("DynamicBackColor","IIF(MOD(RECNO( ), 2)=0, RGB(205,215,212), RGB(0,255,0))", "Column")
		Locate
		.Refresh
	Endwith
	Bindevent(This,"afterRowColChange",Thisform,"my")
	Endproc

	Procedure olecontrol1.Init
	This.Navigate("about:blank")
	Endproc


Enddefine
*
*-- EndDefine: asup
note: can use CSS to style the web page as your convenience.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform