Home » Community » Newbie corner » Focus problem
Re: Focus problem [message #57805 is a reply to message #57799] |
Sat, 18 December 2021 16:03   |
Silvan
Messages: 56 Registered: December 2014 Location: Trento (IT)
|
Member |
|
|
Thank you Lance,
understood and it solve all my inizial problem.
And what about if would like to do something like this:
MainWindow()
{
Title("Test Focus").Zoomable().Sizeable();
Add(inputtext.TopPosZ(0, 16).HSizePos());
Add(panel.VSizePos(18, 0).HSizePos(0, 0));
inputtext <<= "test";
ActiveFocus(panel);
panel.Paint << [&](Draw &w) { w.DrawText(p.x, p.y, "#", Arial(30), Red);};
panel.Key << [&](dword key, int count) { switch (key) { /
case K_W: /
p.y-=1; /
break; /
case K_S: /
p.y+=1; /
break; /
case K_A: /
p.x-=1; /
break; /
case K_D: /
p.x+=1; /
break; /
default: /
; /
} /
Refresh(); return true; }; /
SetRect(0, 0, 300, 300);
p.x = 150;
p.y = 150;
}
};
This code does not compile.... I would override directy the method and event of ImageCtrl panel.
How this is possible?
Thank you
Silvan
|
|
|
 |
|
Focus problem
By: Silvan on Tue, 14 December 2021 21:23
|
 |
|
Re: Focus problem
By: Silvan on Wed, 15 December 2021 14:28
|
 |
|
Re: Focus problem
By: Silvan on Fri, 17 December 2021 23:01
|
 |
|
Re: Focus problem
By: Lance on Sat, 18 December 2021 05:39
|
 |
|
Re: Focus problem
By: Silvan on Sat, 18 December 2021 16:03
|
 |
|
Re: Focus problem
By: Silvan on Sat, 18 December 2021 16:22
|
 |
|
Re: Focus problem
By: Lance on Sat, 18 December 2021 17:17
|
 |
|
Re: Focus problem
By: Lance on Sat, 18 December 2021 17:24
|
 |
|
Re: Focus problem
By: Silvan on Sat, 18 December 2021 18:32
|
 |
|
Re: Focus problem
By: Silvan on Sun, 19 December 2021 12:23
|
 |
|
Re: Focus problem
By: Lance on Sun, 19 December 2021 14:22
|
 |
|
Re: Focus problem
By: Lance on Sun, 19 December 2021 14:31
|
 |
|
Re: Focus problem
By: Lance on Sun, 19 December 2021 14:44
|
 |
|
Re: Focus problem
By: Silvan on Sun, 19 December 2021 15:37
|
 |
|
Re: Focus problem
By: Silvan on Sun, 19 December 2021 15:59
|
 |
|
Re: Focus problem
By: Lance on Sun, 19 December 2021 16:16
|
 |
|
Re: Focus problem
By: Lance on Sun, 19 December 2021 16:24
|
 |
|
Re: Focus problem
By: Silvan on Sun, 19 December 2021 19:31
|
 |
|
Re: Focus problem
By: Lance on Mon, 20 December 2021 13:43
|
Goto Forum:
Current Time: Sun Aug 24 05:57:32 CEST 2025
Total time taken to generate the page: 0.04143 seconds
|