Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » how to simulate text links?
icon5.gif  how to simulate text links? [message #22127] Fri, 19 June 2009 04:27 Go to previous message
bonami is currently offline  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.
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Previous Topic: Menus on dual monitors (Windows)
Next Topic: Problem with ScrollContainer...
Goto Forum:
  


Current Time: Tue May 14 02:36:05 CEST 2024

Total time taken to generate the page: 0.01507 seconds