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: Layout (Forms) Designer » Widget that not supported yet by TheIDE
Widget that not supported yet by TheIDE [message #10613] Thu, 19 July 2007 05:33 Go to next message
johnevans77 is currently offline  johnevans77
Messages: 38
Registered: July 2007
Member
Dear All,

How to deal with widget that not supported yet by TheIDE layout designer?

I look at supported widget when adding widget to layout and found that not all of widget is supported yet. Should i add manually in my .cpp file (writing code), or we have another better way?

Please advise,
JE
Re: Widget that not supported yet by TheIDE [message #10618 is a reply to message #10613] Thu, 19 July 2007 12:18 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
There are two ways:
1) In the Layout Designer right click and select 'User Class'. You get an empty ctrl that you can layout and you can then set the class type using the panel on the bottom left (eg. to ColumnList).

2) To add a control to the Layout Designer menu and have a preview available while laying out you can create a .usc file in your package and add a script for it. See CtrlLib/CtrlLib.usc for examples.

James.
Re: Widget that not supported yet by TheIDE [message #10619 is a reply to message #10618] Thu, 19 July 2007 14:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13974
Registered: November 2005
Ultimate Member
mrjt wrote on Thu, 19 July 2007 06:18

There are two ways:
1) In the Layout Designer right click and select 'User Class'. You get an empty ctrl that you can layout and you can then set the class type using the panel on the bottom left (eg. to ColumnList).

2) To add a control to the Layout Designer menu and have a preview available while laying out you can create a .usc file in your package and add a script for it. See CtrlLib/CtrlLib.usc for examples.

James.


Add 1:

There are in fact two situations:

- the class of widgets is defined at time layout file is included. In that case you can simply write the name of class into the field; you will only see a an empty rectangle with class name on the screen, but for custom widgets that is enough.

- if the class is defined at the point of .lay inclusion, you can still place it to the layout - just leave the field empty. In this case, you hace to the *public* member variable with the same id as "variable" field to your dialog (or layout) class.
Re: Widget that not supported yet by TheIDE [message #10621 is a reply to message #10619] Thu, 19 July 2007 15:42 Go to previous messageGo to next message
johnevans77 is currently offline  johnevans77
Messages: 38
Registered: July 2007
Member
First, thank you for answers Smile

I am sorry. Still did not get it.

Get in real problem, how can i add Image?

Or, just curious, is it a lot of control not supported yet?

JE
Re: Widget that not supported yet by TheIDE [message #10623 is a reply to message #10621] Thu, 19 July 2007 18:00 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13974
Registered: November 2005
Ultimate Member
Image is not Ctrl...

If you need static widget that displays Image, use ImageCtrl.

Mirek
Re: Widget that not supported yet by TheIDE [message #10624 is a reply to message #10623] Thu, 19 July 2007 19:25 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
johnevans77,
My first guess, you've already explored EyeCare for your system tray needs. Smile
My second guess, your boss is not happy because he can't see in Layout designer what kind Shocked of images you are putting inside his company's software Laughing ???

Btw, from EyeCare.lay:
LAYOUT(EyeCareLayout, 270, 216)
	ITEM(MenuBar, menu, LeftPosZ(0, 256).TopPosZ(0, 24))
	ITEM(ImageCtrl, image, LeftPosZ(10, 253).TopPosZ(32, 40))
	....
END_LAYOUT

[Updated on: Thu, 19 July 2007 19:27]

Report message to a moderator

Re: Widget that not supported yet by TheIDE [message #10629 is a reply to message #10613] Fri, 20 July 2007 03:14 Go to previous messageGo to next message
johnevans77 is currently offline  johnevans77
Messages: 38
Registered: July 2007
Member
Mirek,

I am sorry, but i can not find ImageCtrl from All widget i can put on designer.


fudadmin,
Sure. I have looked at EyeCare example Smile Thank you.

So, regarding to EyeCare.lay, if someday i can not find widget on layout designer, i can add it manually to the code?

Please advice,
JE
Re: Widget that not supported yet by TheIDE [message #10640 is a reply to message #10629] Fri, 20 July 2007 10:24 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
johnevans77 wrote on Fri, 20 July 2007 02:14

Mirek,

I am sorry, but i can not find ImageCtrl from All widget i can put on designer.


fudadmin,
Sure. I have looked at EyeCare example Smile Thank you.

So, regarding to EyeCare.lay, if someday i can not find widget on layout designer, i can add it manually to the code?

Please advice,
JE


Yes.
LayDes is just to display things. With layouts you must think in C++ terms and have in mind:
1. if a widget is already supported (programmed) in C++/U++ but not programmed (you meant this "supported"?) in Laydes *.usc (this is why some U++ widgets are not shown or "fully" functional)
OR
2. You programmed in C++/U++ your own widget

------->then your actions:
1. enter the name of your widget class
2. enter the name of your widget instance
3. !!!important: #include your widget declarations correctly.

[Updated on: Fri, 20 July 2007 10:27]

Report message to a moderator

Re: Widget that not supported yet by TheIDE [message #10642 is a reply to message #10640] Fri, 20 July 2007 10:39 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Quote:

can I add it manually to the code?

"Manually" means you have 3 possibilities:
1. Semi-automatic - just fill in the LayDes fields with:
1.1. name of your widget class
1.2. name of your widget instance
1.3 do postioning
2. "pure" manually with theide editor after shortcut "Ctrl_T"
3. manually or programatically with an editor of your choice or awk, ced, gvim etc.

P.S I use 1- 90%, 2-10% of cases.
Re: Widget that not supported yet by TheIDE [message #10651 is a reply to message #10642] Fri, 20 July 2007 14:18 Go to previous message
johnevans77 is currently offline  johnevans77
Messages: 38
Registered: July 2007
Member
fudadmin wrote on Fri, 20 July 2007 10:39

Quote:

can I add it manually to the code?

"Manually" means you have 3 possibilities:
1. Semi-automatic - just fill in the LayDes fields with:
1.1. name of your widget class
1.2. name of your widget instance
1.3 do postioning
2. "pure" manually with theide editor after shortcut "Ctrl_T"
3. manually or programatically with an editor of your choice or awk, ced, gvim etc.

P.S I use 1- 90%, 2-10% of cases.



Thank you very much Smile I choose number 1 for now Smile

Best regards,
JE
Previous Topic: Wrong behaviour when switching from text to graphical mode [BUG]
Next Topic: need Picture control window
Goto Forum:
  


Current Time: Tue Mar 19 06:49:31 CET 2024

Total time taken to generate the page: 0.01020 seconds