Python Forum
[Tkinter] modify the html table to include data from tkinter labels
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] modify the html table to include data from tkinter labels
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble with Tkinter labels Raysz 6 1,466 Sep-11-2023, 02:58 PM
Last Post: deanhystad
  Tkinter having problems with packing labels? wallgraffiti 0 1,507 Aug-02-2020, 09:26 AM
Last Post: wallgraffiti
  Creating and destroying dynamic labels in Tkinter MarcusRoberts 1 4,244 May-02-2020, 06:49 PM
Last Post: Yoriz
  Spacing Between two labels are very far and Top label is not in Center using Tkinter barry76 2 7,006 Jul-30-2019, 10:49 AM
Last Post: wuf
  [Tkinter] can't update label to include variable foxtreat 2 3,605 Dec-01-2018, 07:16 AM
Last Post: jfong
  3D data mapper with data labels using python modules lemon 0 2,009 Nov-15-2018, 09:17 AM
Last Post: lemon
  [PyQt] How to display multiple data(from 2 different related table) in one cell of QTableWid yangjae 4 4,320 Oct-17-2018, 07:54 AM
Last Post: Larz60+
  [Tkinter] insert table columns data in different textboxes dimvord 4 4,856 Jun-15-2018, 07:40 AM
Last Post: dimvord
  Help - GTK3 + Pango: Printing data as table format scandido 0 3,167 Jan-26-2018, 06:03 PM
Last Post: scandido
  type farsi in the sql table tkinter gray 1 3,342 Feb-24-2017, 06:50 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020