Python Forum
[Tkinter] modify the html table to include data from tkinter labels - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: [Tkinter] modify the html table to include data from tkinter labels (/thread-34036.html)



modify the html table to include data from tkinter labels - rwahdan - Jun-20-2021

Hi,

I have the following html tags inside the mail function in python and I need to fill the table with data from labels insides python GUI tkinter.

msg.add_alternative("""\


  <!DOCTYPE html>
<html>

<head>
	<style>
		table,
		th,
		td {
			border: 1px solid black;
		}
	</style>
</head>

<body>

	<h2>Table With Border</h2>

	<p>Use the CSS border property to add a border to the table.</p>

	<table style="width:100%">
		<tr>
			<th>Firstname</th>
			<th>Lastname</th>
			<th>Age</th>
		</tr>
		<tr>
			<td>Jill</td>
			<td>Smith</td>
			<td>50</td>
		</tr>
		<tr>
			<td>Eve</td>
			<td>Jackson</td>
			<td>94</td>
		</tr>
		<tr>
			<td>John</td>
			<td>Doe</td>
			<td>80</td>
		</tr>
	</table>

</body>

</html>

  """,subtype='html')
instead of the manual data entry i have some data i collected from labels that i need to add to the table.