Database to show with changing column width Topic is solved
Database to show with changing column width
Hello
I'm hopeing for some ideas how to achieve this the best.
All the text is in a database, therefore I posted the question also here, as there might be a solution close to a database possible as well.
I want to show bible texts below each other. Some of the texts should be editable, with hoovering over it, it should show some additional information.
So far I know I could come with wxDataViewCtrl and with a own model.
To hide the column names I did not find, but I think that should be possible as well.
But the problem I have is there a way to change the length for each column after the text inside this row?
Otherwise it would sometimes be to much space between the texts.
Or is there a other way to achieve that?
I'm hopeing for some ideas how to achieve this the best.
All the text is in a database, therefore I posted the question also here, as there might be a solution close to a database possible as well.
I want to show bible texts below each other. Some of the texts should be editable, with hoovering over it, it should show some additional information.
So far I know I could come with wxDataViewCtrl and with a own model.
To hide the column names I did not find, but I think that should be possible as well.
But the problem I have is there a way to change the length for each column after the text inside this row?
Otherwise it would sometimes be to much space between the texts.
Or is there a other way to achieve that?
Re: Database to show with changing column width
Using wxDataViewCtrl for text would definitely be unusual, but i see how it could make sense in your case.
If i understand you correctly, you want two columns, the first one containing one sentence/verse per row and the second column with editable comments?
If i understand you correctly, you want two columns, the first one containing one sentence/verse per row and the second column with editable comments?
I don't understand this. Can you explain a little more what the problem is?But the problem I have is there a way to change the length for each column after the text inside this row?
Otherwise it would sometimes be to much space between the texts.
Use the source, Luke!
Re: Database to show with changing column width
I want the width of the column seperate in each row.
But should be:
Code: Select all
To explain the difference
Column1 Column2 Column3
I was ready
Extraordinary superlong column
Code: Select all
I was ready
Extraordinary superlong column
Last edited by Wolfgang on Tue Feb 19, 2019 7:26 pm, edited 3 times in total.
Re: Database to show with changing column width
That's impossible in any list based control and it sounds like a horrible GUI anyway.I want the width of the column seperate in each row.
And i still don't think you need (or even want) this.
Can you make a scribble or something of what you have in mind?
Use the source, Luke!
Re: Database to show with changing column width
It should show a bible text, but some of the bilbe texts should be changeable. And when hovering over it should show additional information to that word.
Other approach would be with a normal textbased gui, but there again, the bibles will be in an sqlite database, at the moment not sure if only database or in a variable, will depend on speed.
Other approach would be with a normal textbased gui, but there again, the bibles will be in an sqlite database, at the moment not sure if only database or in a variable, will depend on speed.
Re: Database to show with changing column width
Even worse than that, I want words belonging to a (strongs number) in a column (so different numbers of columns as well), and every verse in a new row.doublemax wrote: ↑Mon Feb 18, 2019 2:23 pm Using wxDataViewCtrl for text would definitely be unusual, but i see how it could make sense in your case.
If i understand you correctly, you want two columns, the first one containing one sentence/verse per row and the second column with editable comments?
I don't understand this. Can you explain a little more what the problem is?But the problem I have is there a way to change the length for each column after the text inside this row?
Otherwise it would sometimes be to much space between the texts.
As I work on a translation myself I need the bible text changeable.
Re: Database to show with changing column width
Why I cannot quickly think of a better way, I asked here, what all of you would suggest for the problem.
Re: Database to show with changing column width
First of all, this thread is not database related at all. It has to do with designing the user interface of your application, only. Where the dispalyed data are stored doesn't matter in this context.
Second, as doublemax already pointed out it is simply impossible to have varying column widths for each displayed row. What you could do would be to display a list with selection criteria in a typical list control, and as soon as a row in the list is selected the text belonging to the selection could be displayed in a separate multi-line text control.
However, I have to admit that I don't have a clue what exactly you try to accomplish. It would really help if you could draw a sketch (with some drawing tool or simply with pencil and paper) of what you have in mind.
Regards,
Ulrich
Re: Database to show with changing column width
I think i know what you mean now. You're thinking of displaying each verse(?) in a single line.But the problem I have is there a way to change the length for each column after the text inside this row?
Otherwise it would sometimes be to much space between the texts.
I however, thought about displaying the variable length text in a multiline display.
This can be done with wxDataViewCtrl, but you'll need a custom renderer for the multiline text.
Use the source, Luke!
Re: Database to show with changing column width
Here again so it is also to see.
I want the width of the column seperate in each row.
But should be:
Every woord should be editable and it should be possible to create hoover over.
Other idea I had, is to create wxtextctrl for all words, and make basically my own dataviewctrl.
I want the width of the column seperate in each row.
Code: Select all
To explain the difference
Column1 Column2 Column3 Column4
I was ready
Extraordinary superlong column test
Code: Select all
I was ready
Extraordinary superlong column
Other idea I had, is to create wxtextctrl for all words, and make basically my own dataviewctrl.
Re: Database to show with changing column width
Before you start with bad workarounds, think about what would be best for the user.Other idea I had to create wxtextctrl for all words, and make basically my own dataviewctrl.
At this point i would consider using a HTML based control. With standard GUI elements this will be hard to do.Every word should be editable and it should be possible to create hover over.
Use the source, Luke!
Re: Database to show with changing column width
Hi,
Everything is table-based.
You can create controls on demand and add them to the wxScrolled<> and remove the one that goes off the visible area, but this will be more hassle and more work for no gain. An application will eventually slow down significantly.
So you need to re-think the design of you application.
I'd make it so that every verse be in one cell of either wxDataViewCtrl or wxListCtrl and the edit it in wxDialog.
Thank you.
There is no standard control that can do that. Even Excel-like controls (wxGrid) do not support this layout.Wolfgang wrote: ↑Tue Feb 19, 2019 7:30 pm Here again so it is also to see.
I want the width of the column seperate in each row.But should be:Code: Select all
To explain the difference Column1 Column2 Column3 Column4 I was ready Extraordinary superlong column test
Code: Select all
I was ready Extraordinary superlong column
Everything is table-based.
You cam do that - put you layout with a huge number of text control in the wxScrolled<>. The only problem is - on Windows there is a restriction - you can't create more than 65K controls,
You can create controls on demand and add them to the wxScrolled<> and remove the one that goes off the visible area, but this will be more hassle and more work for no gain. An application will eventually slow down significantly.
So you need to re-think the design of you application.
I'd make it so that every verse be in one cell of either wxDataViewCtrl or wxListCtrl and the edit it in wxDialog.
Thank you.
Re: Database to show with changing column width
Is it possible in HTML based control to make it editable, the rest seams exactly what I need. Thank you for pointing me in that direction, could open a separate frame for editing, if it is not possible otherwise.doublemax wrote: ↑Tue Feb 19, 2019 7:38 pmBefore you start with bad workarounds, think about what would be best for the user.Other idea I had to create wxtextctrl for all words, and make basically my own dataviewctrl.
At this point i would consider using a HTML based control. With standard GUI elements this will be hard to do.Every word should be editable and it should be possible to create hover over.
Re: Database to show with changing column width
You'd have to do that on the browser side with Javascript. Definitely possible, but not trivial.Is it possible in HTML based control to make it editable[...]?
That would be pretty simple. Just turn the whole text (or even individual words) into links and use a custom "virtual" URL as link. E.g. "/edit_text?id=177". Then you catch the wxEVT_WEBVIEW_NAVIGATING event, check the url, and if it's this custom link, you open an edit dialog. After editing you rebuild the whole HTML.[...]could open a separate frame for editing, if it is not possible otherwise.
Use the source, Luke!
Re: Database to show with changing column width
Ok,I looked now at the test sample of wxHTMLWindow, and it looks like there I can get out what I need.
The only problem I see now, if there are ways to distinguish between Clicked, right clicked and double clicked, as I usually will need all 3.
OnHtmlCellClicked
or
ONHtmlLinkClicked
There is somehow make a difference between left and right click, as with left click the link gets opened, with right click it does not get opened, but with both he writes into the log window the same.
But there are no seperate events for catching double click or right click on a cell, or am I missing that, or how can that be implemented?
The only problem I see now, if there are ways to distinguish between Clicked, right clicked and double clicked, as I usually will need all 3.
OnHtmlCellClicked
or
ONHtmlLinkClicked
There is somehow make a difference between left and right click, as with left click the link gets opened, with right click it does not get opened, but with both he writes into the log window the same.
But there are no seperate events for catching double click or right click on a cell, or am I missing that, or how can that be implemented?