Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - billarhos

#121
Help requests / Grid issue
27 July 2017, 16:38:12
Hi.
When i add some buttons to my grid widget, i use the center align (default).
However if i use removeAllWidgets before i add my buttons to grid the alignment is getting top-left.

I use the 0.7.4

pGrid->removeAllWidgets();

int index = 0;
for (unsigned int row = 0; row < 2; ++row)
for (unsigned int col = 0; col < 2; ++col) {
pGrid->addWidget(pGridButtons[index++], row, col);


One solution is to use this code insted of "removeAllWidgets()"
auto& widgets = pGrid->getWidgets();
for (int i = 0; i < widgets.size(); i++)
{
pGrid->remove(widgets[i]);
}
#122
Yeap, it is working..
Cheers
#123
Use memcpy instead:
memcpy(pchData, LPCTSTR(m_contents.toAnsiString().c_str()), m_contents.getSize()); it works


Also a GlobalFree i beleive is missing from get(). Not sure...
#124

it crashes here
-->strcpy_s(pchData, sizeof(pchData), m_contents.toAnsiString().c_str());
#125
Yes, i can select the text in the text box.
How can i help u more?
#126
Hi

When press ctrl+c, in all cases (empty edibox, edibox with text, editbox with text selected) i got exception error.
Happens in debug and release.
Are shortcuts supported by editbox?

Using Visual studio 2013
thanks
#127
The code is almost the same as example.


tgui::Table::Ptr pTable;

pTable = std::make_shared<tgui::Table>();
pTable->setSize({ Settings::handler()->layoutHeight(860), Settings::handler()->layoutHeight(600) });
pTable->setPosition({ 14, 40 });

pWindow->add(pTable);

pTable->removeAllWidgets();

std::vector<std::string> headers;
headers.push_back("Date");
headers.push_back("Shop");
headers.push_back("Jackpot Code");
headers.push_back("Amount");

pTable->setHeaderColumns(headers);

pTable->setBackgroundColor({ 203, 201, 207 });
pTable->setFixedColumnWidth(0, Settings::handler()->layoutWidth(140).getValue());
pTable->setFixedColumnWidth(1, Settings::handler()->layoutWidth(170).getValue());
pTable->setFixedColumnWidth(2, Settings::handler()->layoutWidth(80).getValue());
pTable->setFixedColumnWidth(3, Settings::handler()->layoutWidth(90).getValue());

pTable->setStripesRowsColor({ 246, 246, 246 }, { 233, 233, 233 });
pTable->addRow({ "Today", "Stutgard", "ADFG", "1000.00E" });



to generate this issue just remove the last line of my code
#128
Also, if i have add only headers in table widget, the colors are missing after the first header title.

Photo1: I have add a row "pTable->addRow({ "Today", "Stutgard", "ADFG", "1000.00E" });"

Photo2 : I have not added any row.

#129
hi
i decided to replace some list boxes with table widget and here is the issue i face.

to set "setFixedColumnWidth()" must first "setHeaderColumns()". Yes, i can work around but is this a real issue?

Bill
#130
Yes that it is exactly what i needed. It is a great convenience this function. And the syntax allow you to do anything you like.

#131
Found a issue that i can track it down.

In my edit box i have set    setInputValidator("[0-9]*\\,\\.?[0-9]*"). All i want is any numeric value with commas or dots. "example 1=230,450" , "example 2= 100.21"

The problem is that if the edit box has no text then i can not edit nothing but commas or dots for start letter. Is anything wrong with my value string into inputvalidator function?

thanks
#132
General Discussion / Re: tgui issues
30 January 2016, 15:03:17
Sorry for that, i hadn't understood your question in my first reading. (And i hadn't seen the "grid" link). But never mind.
Are u kidding me? Have u finished already?
Awesome!

thank you
Bill



#133
General Discussion / Re: tgui issues
30 January 2016, 12:58:59
Well it is difficult to answer this question because in my drive in programming all these years, i have seen both implementations. I would prefer this one just like grid...

Cheers
Bill

#134
General Discussion / Re: tgui issues
30 January 2016, 11:08:05
Hi Texus.

I think now tgui is almost perfect (in my opinion).
Almost, because it is one more thing that is annoying. Label now can center its text. However, it is not aligned to vertical axis, just as editbox behaves out of the box.
Yes, i managed to make it look just like i wanted by adding little code :

"pLabel->getRenderer()->setPadding(0, Settings::handler()->layoutRevHeight(22.0f).getValue(), 0, 0);"

but i thing it would be better to do it itself.

There is a photo demonstrating this behavior.

Thanks again.

#135
Thanks for the explanation and the fixes.