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

#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.

#136
ok, but can u explain your example code in header file (EditBox.hpp)

"[a-zA-Z][a-zA-Z0-9]*" what the second pair of brackets mean?
#137
hi, i just download the latest version from git hub and i got in my code this linker error:

unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > tgui::EditBox::Validator::Int" (?Int@Validator@EditBox@tgui@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)
1>

if i choose the other way (well , i do not quite understand the two pair of brackets) it is working.

   pEditBoxServerPort->setInputValidator(tgui::EditBox::Validator::Int); -->linker error
   pEditBoxServerPort->setInputValidator("[0-9]*");->working as expected (only numbers)
#138
General Discussion / Re: tgui issues
11 January 2016, 12:41:34
Awesome
Thanks
#139
General Discussion / Re: tgui issues
07 January 2016, 18:19:40
Please texus take your time..
I have no complaints at all.

Here is some pictures of one out of three applications (one project) that u can see much clearly some details.
https://www.mediafire.com/download/cr46u6cb4caaacv/photos.zip
#140
General Discussion / Re: tgui issues
07 January 2016, 18:04:20
great workaround texus thanks.

I attached a jpg where u can see another scenario of using labels. Here i use editboxes instead. Labels with frames that the text inside can
align all cases is used often by me.
Those edit boxes are disable and are not mean to be edit by user.
#141
General Discussion / Re: tgui issues
07 January 2016, 15:48:34
thanks texus

In my case, i want to center the text label over an edit box. The text changing when language is changing, so it hasn't fixed
numbers of letters. (see attached photo). So, i count the width of label and set its potision to (editBox.xpos + editBox.width/2 - label.wdth/2)
to workaround.



#142
General Discussion / tgui issues
07 January 2016, 12:00:55
Hi

here is some misbehaves and a future request.

-1-.Caret vanished on edit boxes with right alignment if has width value "1" or "2"

-2-.Caret is smaller on edit boxes with right alignment if has value 3 or more than the edit boxes with center or left alignment.

-3-. Conclusion of -1- and -2-.  Carret can be seen if has 3 width value or more and the visible width is (width - 2)

-4-. CaretWidth of edit boxes is missing from properties (reading value form txt)

-5-. Need the feature of alignment of text in labels.
      Example: if There is an explanation label over an edit box there is no way to align proper this label on conjuction with edit box.
      The problem grows if the text of the label is changing dynamically (ex. change language). This problem is solving by dynamically recalculate width and position of label.
      Can provide photos if necessary.   
#143
To be honest i made a similar function by just borrowing the code from "ctrl+A" from keyPressed function. On second thoughts i remove it and implemented with the code in previous post.

Do not bother to finish it quickly. I am glad that u will add this.
When i 'll finish my project i will share all my ideas for tgui. U will be surprized for what tgui can do!

And please correct the tip on facebook-twitter (switch) when hovering mouse on forum site!! ha!
#144
ok.
i just made a video that has more to tell u than my mouth have.

https://www.mediafire.com/watch/qeyjlpfauy94kwk/Demo.avi
tip:
On sixth edit box when the key 'enter'  is pressed the "amount" edit box text is setting selected.
This is helping speeding up the whole process!
#145
Thanks for being interested Texus.

It is a project of mine that is quite demanding on tgui. If u have windows pc, i can make a free version for u (using sentinel hasp key) and send a setup in your email (i don't have it) if u still interested. So u can see yourself where i need this functionality.


#146
Thanks for the tip...

Here is some code for anybody who want to set select the text into an edit box via code:
pEditBox->focus();
sf::Event::KeyEvent event;
event.alt = false;
vent.shift = false;
event.system = false;
event.control = true;
event.code = sf::Keyboard::A;
pEditBox->keyPressed(event);


hope in the future u add a setTextSelect function to widgets like edit box
#147
Hi Texus and happy new year.
Just download latest tgui from github and run my project with the new built libraries. However, i got this error in DataIO::parse

"Error while parsing input. Expected '{' or ':', found 'T' instead."

This is happening whatever widget i tried to load.

I have change nothing the last three months. I build everything in the way i did.

the block "if (stream.peek() == '#')" is missing in this version of tgui
#148
General Discussion / Re: focus on disabled widgets
13 November 2015, 20:24:26
Yes they can.

example:
pEditBox->disable(); // set disable

bool enabled = pEditBox->isEnabled(); // this is false

pEditBox->focus(); //now i can edit in editbox
#149
General Discussion / focus on disabled widgets
13 November 2015, 20:13:19
Hi

Should focus override  disabled widgets?
#150
General Discussion / Numeric behavior of editbox
04 November 2015, 15:03:03
hi
Setting numeric values with "1.000,00"  form, the output result is "1.00000". The edit box is in numeric state. Took a look at your code and see that you stop adding special
character after taking the first one.

Is it proper?