Discussion of article "Graphical Interfaces XI: Integrating the Standard Graphics Library (build 16)" - page 3

 
Pavel Kolchin:

m_text_label0t.LabelColor(0x00ff00);

m_text_label0t.LabelText("123");

It doesn't work for me.

I mean, if you call it up.

Print("color = "+m_text_label0t.LabelColor());

Print("text = "+m_text_label0t.LabelText());

the changes are there, but not visually.

Redraw it.

 
Pavel Kolchin:

m_text_label0t.LabelColor(0x00ff00);

m_text_label0t.LabelText("123");

m_text_label0t.Update(true);

How about this?

 
Oleksii Chepurnyi:

...Update(true); - works, I wonder why other elements update themselves, but this one needs to be updated


did you manage to make text selection in the input field?

 
Pavel Kolchin:
....Update(true); - works, I wonder why other elements update themselves, but this one needs to be updated
Not only this element, many things need to be updated. It took me a long time to get used to it :)
 
Pavel Kolchin:

did you manage to make text selection in the input field?

   m_risk_value.GetTextBoxPointer().AutoSelectionMode(true);
If I understood the question correctly....
 
Oleksii Chepurnyi:

Yes, at the first click the whole text is highlighted, it's already good, but then it's impossible to select a part of the text for example

 
Pavel Kolchin:

Yes, at the first click the whole text is highlighted, that's good, but then it's impossible to select a part of the text.

Yes, there is such a thing, I didn't notice it before. I'll have to do some digging when I get back to graphics.....

Maybe the author can tell me?

 

I made one for myself, maybe the author could use it.

 

I can't get the image in the cell-button to change. The image index changes without problems. But I can't change the image itself.

How to do it? What methods redraw the button?

If I use Update() method for CTable instance - the programme compiles but does not run, it says "Invalid EX5 file (4)".

I made the Draw() method from CTable public - it doesn't redraw.

I tried the Reset() method from CWindow - apparently it redrew the window, because it became dim. But the buttons have not changed.


Has anyone successfully made cell-buttons?

 
Artem Virskiy:

If you use Update() method for CTable instance - the programme compiles but does not run, it writes "Invalid EX5 file (4)".


Has anyone successfully made cell-buttons?

I have done the cells-buttons, but there was no task to change the picture....

The Update() method has redraw set to false by default. With redrawing you need to use Update(true)