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 » easiest way to convert a Topwindow into a control
Re: easiest way to convert a Topwindow into a control [message #6024 is a reply to message #6023] Sat, 28 October 2006 21:28 Go to previous messageGo to previous message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
i just reread some usc files and wrote a simple example:

ExampleCtrl.usc
ctrl ExampleCtrl {
   group "Complex"; //will add this Ctrl to the Complex group
   GetMinSize() {return Size(100,50);}
   GetStdSize() {return Size(400,150);}

   bool privateVar = true; // so you can configure your private variables in the Layout Designer

   Paint(w) {
      r = GetRect();
      //have a look at CtrlLib.usc for many usefull functions
      //but as far as i have read you can "only" draw rects, images and text

      //these three lines draw a white Ctrl with a black thin border
      w.DrawRect(r,:SBlack);
      DeflateRect(r); //makes the rect smaller by one on each side
      w.DrawRect(r,:SWhite);
   }

}

Bas
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Promlem with ColumnList::SetDisplay()
Next Topic: run function from user control to other control
Goto Forum:
  


Current Time: Fri Jun 06 11:08:59 CEST 2025

Total time taken to generate the page: 0.04067 seconds