Home » U++ Library support » U++ Widgets - General questions or Mixed problems » how to simulate text links?
how to simulate text links? [message #22127] |
Fri, 19 June 2009 04:27 |
|
bonami
Messages: 186 Registered: June 2007 Location: Beijing
|
Experienced Member |
|
|
i need to write a couple of lines of text and when user clicks one, an image is shown. Thus, they are much like text links in web browsers. How to?
in Paint(),
w.DrawRect(GetSize(), SColorFace());
w.DrawText(0, 0, "Graphical introduction", Arial(30).Underline(), Blue);
Then how to determine the text's area so that I know user clicks on it? Font::GetHeight() may be working, but how about the width? FontInfo::GetWidth(int) seems okay, but i'll have to count the charcters one by one. Is there an easy way please? thank you.
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Oct 31 23:47:56 CET 2024
Total time taken to generate the page: 0.02252 seconds
|