Python Forum
Display table field on multiple lines, 'wordwrap'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display table field on multiple lines, 'wordwrap'
#1
Good Day all,

I'm having issues displaying data from a sqlite.db, table>field to inside a text block. It wants to display onto one continuous line. I have tried wrap=WORD on my text block, ...no changes. Is there something specific I need to do to my sqlite data structure?

I'm new to fetching data from a db, learning the ropes. Is it all in the code to how the data is to be displayed? Or does the database structure/settings have some play into this as well?

Just to be clear what I am looking for basically is word wrapping.Good Day all,

I'm having issues displaying data from a sqlite.db, table>field to inside a text block. It wants to display onto one continuous line. I have tried wrap=WORD on my text block, ...no changes. Is there something specific I need to do to my sqlite data structure?

I'm new to fetching data from a db, learning the ropes. Is it all in the code to how the data is to be displayed? Or does the database structure/settings have some play into this as well?

Just to be clear what I am looking for basically is word wrapping.

The code snippet feature isn't working, so hopefully this displays correctly. Below is a simple snippet of what I have. The TextBox class is actually duplicated only called with a different name, where the data from that class when called displays data as selected in Scrollable List Boxes, the last list box, I am able to get the data selected and displayed into a text cotainer, only it still wants to display it as if it was a selectable <<ListboxSelect>>, when the callable class TextBox, clearly defines that it is a text box with word wrap.

So do you guys think the issue is with my code? Or is there something I am missing with how data can be displayed from a sqlite.db>table?

class TextBox(noteB):
def __init__():
...
        tfield = Text()
        tfield.config(wrap=WORD)

        self.bind(tfield, self.on_select)



    e1 = TextBox(browser, conn, "notes", "notes", ("notes", "aid"))
    e1.grid(row=1, column=2, sticky='nsew', rowspan=3, padx=(5, 10), pady=(0, 10))
    e1.config(border=1)

    photoList.link(e1, "aid")
Larz60+ write Aug-06-2021, 11:48 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Fixed this time. Please use bbcode tags on future posts.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Using SQLAlchemy, prevent SQLite3 table update by multiple program instances Calab 3 756 Aug-09-2023, 05:51 PM
Last Post: Calab
  How to display <IPython.core.display.HTML object>? pythopen 3 45,976 May-06-2023, 08:14 AM
Last Post: pramod08728
  extract table from multiple pages sshree43 8 5,312 Dec-12-2022, 10:34 AM
Last Post: arvin
  How to write the condition for deleting multiple lines? Lky 3 1,143 Jul-10-2022, 02:28 PM
Last Post: Lky
  Delete multiple lines from txt file Lky 6 2,302 Jul-10-2022, 12:09 PM
Last Post: jefsummers
  Display value in the another entry field instead of message box adisc 6 1,570 Jun-25-2022, 02:30 PM
Last Post: rob101
  Slittping table into Multiple tables by rows drunkenneo 1 2,062 Oct-06-2021, 03:17 PM
Last Post: snippsat
  UPDATE SQLITE TABLE - Copy a fields content to another field. andrewarles 14 4,405 May-08-2021, 04:58 PM
Last Post: ibreeden
  Load the data from multiple source files to one table amy83 2 2,593 Apr-27-2021, 12:33 AM
Last Post: Pedroski55
  pulling multiple lines from a txt IceJJFish69 3 2,583 Apr-26-2021, 05:56 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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