Recent Posts

Pages: 1 ... 8 9 [10]
91
Feature requests / Re: listview and add item
« Last post by billarhos on 25 February 2019, 07:59:00 »
Ok Texus. I respect that you want to keep the different namethology than windows.

So, "updateItem" and "updateSubItem" are good with me. And there are plenty of use cases that need both of these functions.

Also i know many cases that you could add more than 100 items. Sometimes, there is a need to load more than 1000 items. Look at "Mp3tag", Virtual Dj" or similar programs. Recently i used "Mp3tag" where i had to load some music folders with more than 10000 mp3 files altogether. And that's the reason for a "addMultipleItems" function.

I didn't check if you have a right click on a item-row! Have you?



92
Help requests / Re: ChildWindow - TitleBarHeight
« Last post by Jeckhys on 25 February 2019, 06:56:17 »
However, something is still a bit surprising, setting the TitleBarHeight through :

Code: [Select]
m_window->getRenderer()->setTitleBarHeight(50);
works well ! But, if I removed the previous line and instead add the following line to my theme file "default.txt" :

Code: [Select]
ChildWindow {
    TitleBarHeight = 50;
}

It doesn't change anything. But this property is still recognized by the parser as I have no error message, just that setting is to 5, 50, 500 or whatever will not affect the TitleBarHeight at all.

Is that normal ? (just wondering)
93
Help requests / Re: ChildWindow - TitleBarHeight
« Last post by Jeckhys on 25 February 2019, 06:00:05 »
That's my really bad, didn't update to TGUI last version. I was still using 0.8.1....

Sorry for bothering ! It works now !
94
Help requests / Re: ChildWindow - TitleBarHeight
« Last post by texus on 24 February 2019, 19:26:37 »
Using "window->getRenderer()->setTitleBarHeight(...);" changes the title bar height for me. Can you share some example code where the title bar isn't being changed (as it probably has to do with the order in which functions are being called)?
95
Feature requests / Re: listview and add item
« Last post by texus on 24 February 2019, 19:24:02 »
Although I don't want the API to be the same as the corresponding Windows component, I was trying to keep it somewhat similar. So I'm a bit hesitant to make some of these changes.

1. I see an item as an entire row, so an addItem function that takes a column argument doesn't fit with my vision of the ListView. I consider the "addItem(const sf::String& text)" to only exist for convenience in case someone just uses the widget for a single column or in case I add an addSubItem function in the future. The "addItem(const std::vector<sf::String>& item)" is what I consider the "real" addItem function.

2. I could rename it to addRow or addItemRow though, but the reason would be to have the naming more consistent with getItemRow (which only uses the term "row" because I couldn't find a better word and the "getItem" function already existed).

3. Similarly, removeItem removes an entire row because the row is the item.

4-5. I'm not sure how to best deal with selecting a single cell, the ListView doesn't need to support something like that imho. If you have some use case for it then maybe I can still add an option to select a cell instead of a row though, but it wouldn't be the default behavior.

A way to update an item is still lacking, so I can definately add something like "bool updateItem(std::size_t index, std::vector<sf::String>)". Maybe I'll add something like "updateSubItem(std::size_t rowIndex, std::size_t columnIndex, sf::String)" too, but the updateItem is the most important one as there is currently no way at all to change an item.

A "void addMultipleItems(const std::vector<std::vector<sf::String>> & item)" could be added, but only for performance reasons. In terms of usability, you can just call addItem in a loop, so there isn't much need for such a function. But if you are working with over 100 items then it could still be useful because it would insert the items slightly faster. Although I wonder if the difference would be big enough to notice, that is something that I should test first.
96
Help requests / ChildWindow - TitleBarHeight
« Last post by Jeckhys on 24 February 2019, 19:08:50 »
Hello !

I'm currently designing a GUI for a game and I was wondering if there is a way to change the ChildWindow's TitleBar's height ?

I found the property "TitleBarHeight" but changing it doesn't seem to make any difference, is that normal ? I change it using :

Code: [Select]
window->getRenderer()->setTitleBarHeight(...);
97
Feature requests / listview and add item
« Last post by billarhos on 24 February 2019, 16:03:52 »
Hi Texus

You have:
Code: [Select]
1 : std::size_t addItem(const sf::String& text);
2: std::size_t addItem(const std::vector<sf::String>& item);
3 : bool removeItem(std::size_t index);

4 : void setSelectedItem(std::size_t index);
5: int getSelectedItemIndex() const;
i am sure that i forget some other functions

1. Add item as a row or in a specific cell in a specific column
Code: [Select]
std::size_t addItem(std::size_t columnIndex, const sf::String& text);

2: should be
Code: [Select]
std::size_t addRow(const std::vector<sf::String>& item);

3. is remove item - or remove row
4. setSelectedItem on which column
5. is selected row or selected a specific cell in a specific column
 
there is a need to be distiguish the cell index and the column index.
Also there is need for a "setCell(column, cell, text)" function like :
Code: [Select]
void setColumnText(std::size_t index, const sf::String& text);

and may be a

Code: [Select]
std::size_t addMultiRows(const std::vector<std::vector<sf::String>> & item);

thank you


98
Help requests / Re: List view
« Last post by billarhos on 15 February 2019, 08:25:14 »
"Now we are talking"
"Awesome"

a big thanks
99
Help requests / Re: List view
« Last post by texus on 14 February 2019, 22:19:14 »
The following changes were just made to the ListView widget:

- Added horizontal grid lines to ListView
- Added option to ListView to expand the last column to fill the remaining space
- Allow a separator between the header and contents in a ListView
- Split separator in ListView into separator and vertical grid line
100
Help requests / Re: List view
« Last post by texus on 01 February 2019, 18:43:56 »
I'll add VerticalGridLines and HorizontalGridLines properties.
Then the current SeparatorColor in the renderer could be just for the part in the header and a new GridLinesColor could be used for the vertical and horizontal grid lines.

Instead of LastColumnBorderVisible, I could perhaps add a FillColumn option which can be set to the column that should expand to fill the list view. Although then I can't make the last column filled by default as I would already need -1 to disable the option. Maybe I should just stick with FillLastColumn or ExpandLastColumn as this will be most likely be the column that should be expanded.
Pages: 1 ... 8 9 [10]