View previous topic :: View next topic |
Author |
Message |
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Dec 06, 2004 1:49 pm Post subject: Form Designer for DFL |
|
|
I've started a point-and-click form designer for DFL called DFL Designer. It's not really usable yet, but you can check it out at http://www.dprogramming.com/dfldesigner.php
I have a feeling the child control tools will be a pain to implement, and might take awhile to finish, so I thought I'd drop a line about the project a bit early.
Let me know what you think, any suggestions you may have, etc
- Chris |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Mon Dec 06, 2004 3:47 pm Post subject: |
|
|
I wish you have better luck in this subject than me.
I have started 4 GUI designers (2 of them 100? dead), I've only had satisfactory results when using .Net. Why? 2 reasons: 1) RTTI, 2) the PropertyEditor control.
That latest designer project is alive and outputs XML code. My idea was that further down the road it could be used as a general GUI designer for any library. So I started to write a converter to take that XML code and output D code for the Apollo library (yes, it's alive again ), but there're so many differences between .Net properties and Apollo properties (even control names), that it's on halt right now.
So, as far as my own experience is concerned, those are the problems I've had, which I hope you can succesfully solve. |
|
Back to top |
|
|
Bojo
Joined: 22 Oct 2004 Posts: 23 Location: Denmark
|
Posted: Mon Dec 06, 2004 4:59 pm Post subject: Re: Form Designer for DFL |
|
|
Vathix wrote: | I've started a point-and-click form designer for DFL called DFL Designer. |
It looks very promising. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Tue Dec 07, 2004 7:02 pm Post subject: |
|
|
Thanks. I'm not using RTTI and I made the property editing control with an owner drawn DFL ListBox. |
|
Back to top |
|
|
Nova
Joined: 18 Sep 2004 Posts: 23
|
Posted: Tue Dec 14, 2004 6:14 pm Post subject: |
|
|
Looking very nice =)
Will you release the code to this tool along with the rest of DFL? |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Wed Dec 15, 2004 12:11 pm Post subject: |
|
|
Nova wrote: | Looking very nice =)
Will you release the code to this tool along with the rest of DFL? |
Thanks. I'm not sure what I'm going to do with it yet. |
|
Back to top |
|
|
endless
Joined: 11 Jan 2005 Posts: 3
|
Posted: Tue Jan 11, 2005 1:18 pm Post subject: |
|
|
Vathix wrote: | Thanks. I'm not using RTTI and I made the property editing control with an owner drawn DFL ListBox. |
Hi. How would one go about creating a sreadsheet-like grid using the ListBox? Is there any chance you could squeeze some time for a quick example? Is there some other grid technique i am not aware?
Warning, i am a newcomer. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Tue Jan 11, 2005 4:49 pm Post subject: |
|
|
endless wrote: | How would one go about creating a sreadsheet-like grid using the ListBox? | You can set the ListBox's multiColumn property to true and owner draw in some lines, but the columns will shift around when the height changes. Here's some code,
Code: | // To compile: dmd test.d dfl.lib -L/exet:nt/su:windows:4.0
private import std.string;
private import dfl.all;
class MyForm: Form
{
ListBox myList;
Pen myPen; // Pen for list's lines.
this()
{
myPen = new Pen(Color(0));
with(myList = new ListBox)
{
integralHeight = false;
dock = DockStyle.FILL;
drawMode = DrawMode.OWNER_DRAW_FIXED;
multiColumn = true;
for(int i = 1; i <= 300; i++)
{
items.add("foo" ~ std.string.toString(i));
}
parent = this;
drawItem ~= &myList_drawItem;
}
}
private void myList_drawItem(Object sender, DrawItemEventArgs ea)
{
ea.drawBackground();
// 3 lines to draw lines between.
// Starting at top right, to bottom right, to bottom left.
// Need to subtract 1 so that it stays within the bounds.
Point[3] lines;
lines[0].x = ea.bounds.right - 1;
lines[0].y = ea.bounds.y - 1;
lines[1].x = lines[0].x;
lines[1].y = ea.bounds.bottom - 1;
lines[2].x = ea.bounds.x - 1;
lines[2].y = lines[1].y;
ea.graphics.drawLines(myPen, lines);
// Draw the item's text.
char[] s;
s = myList.items[ea.index].toString();
ea.graphics.drawText(s, ea.font, ea.foreColor, Rect(ea.bounds.x + 1, ea.bounds.y + 1,
ea.bounds.width - 1, ea.bounds.height - 1));
ea.drawFocusRectangle();
}
}
int main()
{
int result = 0;
try
{
Application.run(new MyForm);
}
catch(Object o)
{
MessageBox.show(o.toString(), "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.ERROR);
result = 1;
}
return result;
} |
- Chris |
|
Back to top |
|
|
endless
Joined: 11 Jan 2005 Posts: 3
|
Posted: Wed Jan 12, 2005 5:51 am Post subject: |
|
|
Thank you, the code is mightly interesting. I'll play around with it, and see if i can get a similar concept to work for rows intead of columns. DFL Form Designer, by the way is quite a nice implementation, although it lacks full functionality.
You are doing a wondwrfull job with DFL. Expect to see me around more. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Tue May 17, 2005 11:43 am Post subject: DFL Designer 0.4 |
|
|
This project is not dead! I just ran into an issue that I couldn't seem to solve, then one day the answer just popped into my head and it was very simple.
Here's DFL Designer 0.4, http://www.dprogramming.com/dfldesigner.php - there's not a whole lot of changes, still doesn't support child control tools, but it can help you quickly make an application shell. See readme.txt in the download for more information.
- Chris |
|
Back to top |
|
|
rolftollerud
Joined: 01 May 2005 Posts: 6
|
Posted: Tue May 17, 2005 11:31 pm Post subject: First things first |
|
|
Please Vathix,
A form designer for DFL would be nice but the things have to come in the right order. Without a listview control there are no idea to start any application at all. All rich clients do need this functionality.
As to now all my D development are on hold because the listview control is missing. Also important (but not so important as the listview control) is he tab-control. With these two controls the main work is finished. A simple but effective GUI framework is in place. Observe that of all the others different D GUI's, none has the listview. It is as the C programmers never worked with a database in all their life!
Please do not be distracted by building a form designer at this time, the engagement is much larger than you think. Always finish what you have started before setting out for another task.
Regards
Rolf Tollerud |
|
Back to top |
|
|
qbert
Joined: 30 Mar 2004 Posts: 209 Location: Dallas, Texas
|
Posted: Wed May 18, 2005 3:09 pm Post subject: |
|
|
I agree with rolf , listview is super important, and for me tab view too. But I definetly want both so .
Are there some technical difficulties with implementing listview ? Is listview a common control ?
Charlie |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Wed May 18, 2005 8:48 pm Post subject: |
|
|
Yea, I agree. I do start a lot of projects at the same time but I just wanted to get a version of DFL designer that worked better since designer 0.3 had some issues.
qbert wrote: | Are there some technical difficulties with implementing listview ? Is listview a common control ? |
Not really, it's just pretty long and tedious to wrap the tab and list items into object collections. But both tabcontrol and listview will be in DFL 0.9 which will be released pretty soon.
- Chris |
|
Back to top |
|
|
rolftollerud
Joined: 01 May 2005 Posts: 6
|
Posted: Thu May 19, 2005 5:08 am Post subject: important milestone |
|
|
I hope you do not take my comment as criticism, DFL has out-competed all the other GUI, quite an achievement, IMO! So we can look forward to DFL 0.9. Yippee! That is good news! One important milestone passed.
But looking forward and taking up the question of the Forms designer again, one of the reasons it is not trivial is that it really should be build upon the modern declarative programming that Microsoft call XAML. Perhaps MyXaml should not be too difficult to convert from C# to D. (http://www.myxaml.com/)
XAML in Longhorn is far way away, maybe 7-8 year or longer. There is room for something else. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu May 26, 2005 1:46 pm Post subject: TabControl and ListView |
|
|
Here's ListView, http://www.dprogramming.com/dfl/snapshots/ - it's not completely finished and might have some bugs, but most is done. This was the most difficult control to do, and one reason why I kept putting it off Please test it, if you would. There is an example included. TabControl is also in there if you haven't noticed. Thanks,
- Chris |
|
Back to top |
|
|
|