First I spent a lot of time trying to figure out how to make the stupid toolbar dock inside the tab, but I did it, but as I always do, I forgot to add everything inside a GroupBox! Crap!
At this time I was already really really pissed of, then I tried to add the GroupBox but anything wanted to go inside the GroupBox, Cutting and Pasting didn't work, I was becoming more and more pissed off...
And when I get pissed I try to stay calm and think "isn't there a better way to do this?" then I get those Aha! moments, so I tought, if Delphi isn't helping me, let's do it in a more fun way, then I just opened the dfm code, that luckly is a very simple hierarchy, and everything was in place in less than 30 seconds.
So the tip is, sometimes the UI designer just keeps getting in you way and its better to just open up some code editor and do it by hand (so much funnier), but you need to KNOW what are you doing, otherwise you will just fuck everything up!
Delphi's dfm file are organized in a very very simple hierachy, it is something like this:
object Frame1: TFrame
object Panel1: TPanel
object EditInicio: TcxDateEdit
Left = 67
Top = 5
TabOrder = 0
Width = 100
end
end
end
So in this case, there is a TFrame and inside it a Panel and inside the Panel a cxDateEdit, it you want to move the DateEdit inside the Frame1, you just need to do this:
object Frame1: TFrame
object EditInicio: TcxDateEdit
Left = 67
Top = 5
TabOrder = 0
Width = 100
end
object Panel1: TPanel
end
end
Simple isn't it? The problem is to know when to stop trying to make something quicker using a UI designer that actually slows you down, and when to just open up the source code and just hack!
2 comentários:
I think what you wanted to do was change the "parent" property.
http://billrosspolitics.blogspot.com
http://bibleshockers.blogspot.com
UI design using Delphi is by far the easiest way to do it.
The fact that you do not have the bases for using it does not mean it is hard to use it. It just means you have difficulties using it because you are new with this stuff.
So I highly disagree with your title.
There is no other RAD that would let you do so much with your mouse while designing UI. Delphi simply rules
Postar um comentário