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++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » how to create .tppi and .i files (and a working .tpp in a RichTextView)
how to create .tppi and .i files (and a working .tpp in a RichTextView) [message #25768] Thu, 11 March 2010 02:24 Go to previous message
ricper is currently offline  ricper
Messages: 4
Registered: May 2008
Location: Italy
Junior Member
I'm going to tell you a little story, be patient read it from the beginning to the end, you will save a lot of time!
Suppose you aren't so new to upp.
Suppose you want to add in a previously created form (called AboutDlg) a RichTextView with some stuff inside to do a little About dialog.
What will you do?
IT'S OBVIOUS. You look at the example called HomeBudget!.
In Fact you happily add your .tpp file... How? Are you saying HOW?
IT'S OBVIOUS! Right click with the mouse on a blank portion of the list that is currently displaying your .cpp and .h files and click on the self explanatory voice "Insert Package Directory File(s)". ("Add File(s) to Package" was too simple)
When the window appears type the name of your file (for example TAbout.tpp) and press OK.
Wow! you DID IT!
And now? What! You can't write on the page? You can't click on those enabled-looking buttons?
ITS OBVIOUS! You aren't careful! You must rigth click on the void list on your left searching the "New Topic" menu! Now that you have selected your language you write the topic name, for example... "About"... Is displaiyng About$en-us? Why? Didn't you wrote it? Yes! You did it!
FINALLY! Now you add some text and links and you want to add an image to the... WHAT AGAIN! You don't find the toolbar button to add an image from a file to the page? IT'S OBVIOUS! THERE ISN'T! Why are you searching it there! There is an OBVIOUS menu voice "Insert Image From File" in the "polimorphic" Edit menu, yes after File...
So it's time to add the RichTextView control inside your form (you call it for example mtxtr_About) and a well done copy and paste from the HomeBudget sample


...

#define TOPICFILE <YOURPROJECTNAME/TAbout.tpp/all.i>
#include <Core/topic_group.h>

AboutDlg::AboutDlg()
{
	CtrlLayout(*this, "");
	Sizeable().Zoomable();
	
        mtxtr_About.NoSb();
	//Size sz = mtxtr_About.GetSize();
	mtxtr_About.SetQTF(GetTopic(String("YOURPROJECTNAME/TAbout/About$en-us")), Zoom(100, 600));
	mtxtr_About.SetZoom(Zoom(1, 1));		
}

...



Ok finally! YOU DID IT! WHAAAAT? WHAT! Compiler error? Can't find all.i? Why? ARE YOU ASKING ME WHY? Search on the upp forum. I'm tired.
After a couple of hours and dozen web pages visited...
AAAHHHH you start to learn! IT WAS OBVIOUS? Didn't you notice that small red sign just in the corner of your src.tpp (home budget sample) file?
I was sure! What is it? I'ts a small "I", yes the letter of the alphabet! It means "Includeable Topic Group".
Didn't you found it with your right button? I'm sorry...
Three hours to do a little about window?
It's OBVIOUS!

The end.

Rick



86d14362e245f101f9ffae6c952a7ced
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [BUG] Or at least strange behavior, in Set active
Next Topic: [FEATURE] Alt+L shall do GoBack when the log file is opened (patch included)
Goto Forum:
  


Current Time: Fri Apr 19 03:16:02 CEST 2024

Total time taken to generate the page: 0.02749 seconds