このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


錨,総合司会者 Editor in Lazarus -lt2Nd.htm
HOME - - - - - Lazarus Tutorials TOC - - - - - - Other 構成要素 for programmers
Delicious.Com Bookmark this on Delicious     StumbleUpon.Com Recommend to StumbleUpon

Lazarus 錨,総合司会者 Editor

Useful 道具 for re-sizeable 使用/適用s
Illustrated with a picture 陳列する,発揮するing example

Nothing "深遠な" in this. Nothing that you "need", 一般に. It does illustrate the cleverness of the 錨,総合司会者 Editor. It creates "a pretty".

In the illustration, we can see three screenshots of the 使用/適用 in 活動/戦闘. In each, a window has been created, with four images in it. You can resize the window, and the size of the four images adjusts accordingly... as I hope the three examples of the 使用/適用 in 活動/戦闘 show.

-

There are many ways to do this. Here, we will use a simple method. One consequence of our simple approach is that the program will only 対処する 井戸/弁護士席 with a 4x4 grid of images. Different techniques will be necessary for other grids.

解放する/自由な sourcecode

As usual with SheepdogGuides tutorials, you can download a zip with the sourcecode. (549kb)

異常に, I 港/避難所't 含むd the exe as part of that zip... it (機の)カム to 14,000kb. But you can download the app, almost ready to run. That will download as "ldn188.RenameExe". You have to 改名する it "ldn188.Exe". (The 改名する step was 会社にする/組み込むd because some computers get all upset if you try to download an .exe とじ込み/提出する.)

Let's go...

Start a 事業/計画(する) in the usual way. Put a label on the form with author (警察などへの)密告,告訴(状), etc. You'll see my usual answer to 見解/翻訳/版 documentation if you search on "vers".

Put four image 構成要素s on the form. 指名する them imUL, imUR, imLL, imLR for "image... upper/lower... left/権利".

We're nearly done! All we need now is to arrange for some images to appear in the image 構成要素s, and to arrange for everything to 配列し直す nicely.

Images to image 構成要素s

You could 令状 a 調書をとる/予約する on putting images in image 構成要素s. But for today's wants, all you need to do is...

Put four .jpgs into the same folder as your app. I've called them ImageUL.jpg, ImageUR.jpg, ImageLL.jpg, ImageLR.jpg. (I'm not clever enough to be clever.)

In the FormCreate handler, just 挿入する...


imUL.picture.loadfromfile('ImageUL.jpg');

(You may see suggestions on the web that you should 追加する "jpeg" to the Uses 条項. With Lazarus vers 1.0, at least, you don't need too any more.)

That will "work"! (I'm sure you can 延長する it to を取り引きする the other three image 構成要素s)... sort of.

In my 事例/患者, imUL had just a small area from the .jpeg I'd 負担d to it.

No problem... we just need to tweak some of the 所有物/資産/財産s of the 構成要素. You can, of course, do this in the 反対する 視察官. However, if you put code in the 使用/適用 to invoke 非,不,無-基準 所有物/資産/財産s, you are いっそう少なく likely to have a hassle when you come to try to derive something from the 使用/適用 later. But the 反対する 視察官 is a 広大な/多数の/重要な way to see what 所有物/資産/財産s are 利用できる, and "try" さまざまな settings.

The one we need to change for our wants is "Stretch". Should be 始める,決める "true", so, OnFormCreate...


imUL.stretch:=true;

Another 所有物/資産/財産 of any TImage 反対する needs について言及するing here: "比例する". It is 誤った, by default, and it was left "誤った" for my wants in this 使用/適用. If it is 始める,決める to true, then the images 保持する their 面 割合, they don't "stretch out" or "squash up". They WILL get bigger or smaller, but only as far as they can without having to introduce distortion to fill the 利用できる area horizontally and vertically. If you 始める,決める the 比例する 所有物/資産/財産 to "True" in this 使用/適用, without making other changes, the layout of the four images, 親族 to one another, will get, to my 注目する,もくろむ, "messy".

A 詳細(に述べる): All of the images have 国境s which are just part of the image itself. The 国境s you see are not cleverly 供給するd by the program.

Fill in the code for all four images, and we're ready to move on to...


Arrange for re-sizing

There are 面s of what we're doing next which are not unlike trying to pat your 長,率いる and rub your abdomen.

Don't worry too much as we go along about WHERE we are going. We WILL get there! We're going to 取り組む "bits" at a time, and it is only when all the bits are in place that the 十分な "answer" 現れるs.

Have you played with the 錨,総合司会者 Editor? It is WONDERFUL... but you can get yourself into all sorts of 絡まるs.

Before you invoke that, get yourself to the same starting point I had. Just use simple dragging to arrange things 概略で like...

-

Run the program. Change the size of the window. All should be "井戸/弁護士席", but very boring. The images 持続する the same size and position, 関わりなく the app's window's size.

Now select the lower 権利 手渡す image 構成要素, 権利-click, and invoke the 錨,総合司会者 Editor....


Here it is, with some shading 供給(する)d by me, and tweaks to the default settings... the tweaks I want you to make for imLR....

-

The 錨,総合司会者 Editor has 5 sub-sections, which I have 選ぶd out in color. Forget for the moment the central section. Look at the four around the 辛勝する/優位.

Each 支配(する)/統制するs where one 辛勝する/優位 of the 構成要素 will 嘘(をつく).... IF the "enabled" box for that sub-section is ticked.

Each has a "Sibling" 所有物/資産/財産. ("Parent" would, I think, have made more intuitive sense to me, but what do I know? And yes, using "parent" could 井戸/弁護士席 introduce a different 混乱.) We've 始める,決める Sibling for the 権利 and 底(に届く) 錨,総合司会者ing of imLR to ldn188f1, the main form of our 使用/適用, because we want the 辛勝する/優位 positioned 親族 to the whole form.

In each sub-section, there are also three 無線で通信する buttons. They 決定する how the 構成要素 we are configuring "lines up" on its "sibling".

I must 収容する/認める that I don't fully understand 正確に/まさに what each of the 無線で通信する buttons 委任統治(領). But, for our wants, the ones I've used WORK. (Middle 無線で通信する button in each 事例/患者.)

Good news! You can play with the 影響s of different configurations 直接/まっすぐに in the "edit" 方式 of Lazarus.... but don't do that JUST yet...

In 新規加入 to the three (if you 含む the "enabled" tick-box) things in each of the four "錨,総合司会者ing" sub-sections, the numbers in the central sub-section, the magenta one, "国境 Space" 事柄! (Remember I called it "patting 長,率いる/ rubbing tummy"?)

The numbers in the 国境 Space sub-section are "全世界の"... they don't change, as you change to different "錨,総合司会者ing" sub-sections.

We'll start with the four numbers at "north", "east", "south" and "west". I think they 明示する how much space will appear between the corresponding 辛勝する/優位 of the 構成要素 you are 錨,総合司会者ing, and the 関連した 言及/関連 point (RRP!) of the sibling you have 指定するd.

I "got fancy" and introduce RRP because things get a bit obscure (to me, anyway) when you use the 非,不,無-obvious choices with the three 無線で通信する buttons.

With the settings we're using, there せねばならない be an 8 pixel space between the 底(に届く) 辛勝する/優位 of the form and the 底(に届く) 辛勝する/優位 of imLR, and an 8 pixel space between the 権利 手渡す 辛勝する/優位 of the form and the 権利 手渡す 辛勝する/優位 of imLR.

If you were, say, to change the 無線で通信する button for the 権利 錨,総合司会者ing to the 権利 手渡す one, 構成要素s 中心d on a line, the 構成要素 would 中心 on the form. (With that 無線で通信する button selected, 非,不,無 of the かもしれない 関連した numbers in 国境 Space have any 影響.)

Moving on: The central number in the 国境 Space sub-section 作品 as follows: If the 錨,総合司会者ing 機械装置 is 支払う/賃金ing any attention to any of the other numbers, then it will be 追加するd to what is there. E.g., if you aren't using "中心 the 構成要素", but have it 錨,総合司会者d to an 辛勝する/優位, if you put, say, 5 in the 中心 box of 国境 Space, and 無 everywhere else, you will have a 5 pixel space on all 味方するs of the 構成要素 you are 錨,総合司会者ing. Leave 5 in the 中心, make the "eastern" number 4, and you will have 5/ 9/ 5/ 5 to north/east/south/west, それぞれ.

Whew! A wonderfully 柔軟な 道具... but hard to 述べる comprehensively. But I hope you now have the beginnings of an understanding.

In all that we do in this 事業/計画(する), we will 錨,総合司会者 things to the 全体にわたる form, and we will leave the middle number in 国境 Space at 無.

I hope you can 錨,総合司会者 the upper 権利 手渡す image easily enough? Remember: Tick the enable buttons just for 最高の,を越す an left, 始める,決める sibling to the form, 始める,決める the "west" space at 8, and the "north" number high enough to 暴露する the label at the 最高の,を越す of the form....

AND select the 権利 無線で通信する buttons. For imUL, we need the first in each sub-section.

Now 始める,決める the 錨,総合司会者ing for imUR and imLL.

Having done all of that, run the app again, and do some re-sizing.

The four images should "stick" to the corners of the window... but they always stay the same size. Pity. If the app is running in a big window, the images aren't using the area 利用できる.

Resizing images to use space

So far so good. Now we will also use the 錨,総合司会者 Editor to arrange that the image 構成要素s re-size 同様に as re-position themselves within the app's window.

Start with the upper left 構成要素. Re-活動させる/戦時編成する the 錨,総合司会者 Editor, if need be.

始める,決める imUL's RIGHT 錨,総合司会者ing enabled, with imUR as the sibling, and select the first 無線で通信する button. (Two 構成要素s separated by a vertical line.). 始める,決める the "east" 国境 space number to 8.

See what happens when you run the app like that.

It sort of 作品! Now the upper pair of images use the 十分な width of the window, but the one on the 権利 never changes width, and the one on the left is usually ridiculous.

Wouldn't it be nice if you could tell imUR to use imUL's 権利 手渡す 辛勝する/優位 as a sibling, and somehow have things "just work out." You can't, though.

So... Baldrick would be so proud... we're going to use a little trick.

(All of the に引き続いて can be done with the 反対する 視察官, unless you'd rather put them in OnFormCreate.) Put a label on the form. 指名する it laRefPoint. 始める,決める AutoSize 誤った. 始める,決める width and 高さ to 8.

Use the 錨,総合司会者 Editor to 始める,決める laRefPoint up as follows...

最高の,を越す and left 錨,総合司会者ing (only) enabled. Sibling the main form in both 事例/患者s. The 無線で通信する button with two 構成要素s each 分裂(する) by a 選び出す/独身 line in both 事例/患者s. (The last one, in the 見解/翻訳/版 of the 錨,総合司会者 Editor I have. "中心 on it".)

Once that is 始める,決める up, go 支援する to the 錨,総合司会者 Editor settings for imUL and imUR. Enable 権利 錨,総合司会者ing for imUL, and 始める,決める the sibling as laRefPoint. 始める,決める the "east" 国境 spacing to 4. (You'll get another 4 from the settings for imUR, so, to 持続する our "国境 of 8" 計画/陰謀, we use 4 twice.).

Do something like that, 逆転するd, for imUR.

Run the app. Lots remains to be done, but you should find that the 最高の,を越す two images now fill the width of the window, 株ing it 平等に between themselves!

Pretty neat? If you don't think so, try programming that 行為 by the "old ways".

Now change the 錨,総合司会者ing of the 底(に届く)s of imUL and imUR, again making laRefPoint the sibling.

And so on. When all is working 井戸/弁護士席, you might be tempted to change laRefPoint.明白な to 誤った, to get rid of the little "thing" in the 中心 of the 審査する. Try it. Everything goes to pieces! You are left with the "最高の,を越す" image filling the window, blotting out everything... even the 以前 明白な author/ 見解/翻訳/版 label 構成要素! Who would be a programmer? But you CAN get rid of the "little thing"... leave laRefPoint "明白な"... but 始める,決める the caption to... Nothing! Ha! I'm not clever... but I'm stubborn.

結論

So... there you have it.

In a moment, I will 調査する some possible 拡張s of what we have done. First... an admission of a "cheat".

We cheated. The 使用/適用 doesn't 現実に 分配する the images across the window "平等に". The "cheat" isn't 普通は 明白な, but in the extreme 事例/患者 below...

-

... the problem shows. We've arranged for laRefPoint to be in the middle of the window, without making allowance for the fact that a 狭くする 禁止(する)d at the 最高の,を越す is not 利用できる for the images.

While I 港/避難所't 実験(する)d the idea, I 堅固に 嫌疑者,容疑者/疑う that the problem could be 打ち勝つ, if it bothers you, by putting a パネル盤 on the form, sizing it to cover the area to be used for 陳列する,発揮するing the images, and then putting laRefPoint and the four TImage 反対するs on the パネル盤.

If that 作品, and you are industrious, this 事業/計画(する) could be 拡大するd to 陳列する,発揮する 16 images (or more!) by setting up four パネル盤s on the window, each 陳列する,発揮するing four images.

Other 拡張s...

There's no 推論する/理由 why you shouldn't invoke lines like...


imUL.picture.loadfromfile('ImageUL.jpg');

... as often as you wish, while the 使用/適用 is running. Of course, there'd be no point, unless what is in ImageUL.jpg has changed since the first time you invoked the line, or unless you use LoadFromFile to 負担 a different とじ込み/提出する to the upper left (or other) position in the window.

You might use code very 類似の to what we've developed to 陳列する,発揮する the 最新の images 存在 FTP'd to a server from IP (機の)カムs "watching" something.

And there the time I have for this runs out! Always 利益/興味d in your thoughts... or even just a Facebook like, whatever.





Search across all my 場所/位置s with the Google search...

Custom Search
            力/強力にするd by FreeFind
  場所/位置 search Web search
場所/位置 地図/計画する    What's New    Search This search 単に looks for the words you enter. It won't answer "Where can I download InpOut32?"
広告 from page's editor: Yes.. I do enjoy 収集するing these things for you. I hope they are helpful. However... this doesn't 支払う/賃金 my 法案s!!! Sheepdog ソフトウェア (tm) is supposed to help do that, so if you 設立する this stuff useful, (and you run a Windows or MS-DOS PC) please visit my freeware and shareware page, download something, and 循環させる it for me? Links on your page to this page would also be 高く評価する/(相場などが)上がるd!
Click here to visit editor's freeware, shareware page.

Link to Lazarus Tutorials main page
How to 接触する the editor of this page, Tom Boyd


Please consider 与える/捧げるing to the author of this 場所/位置... and if you don't want to do that, at least check out his introduction to the new micro-寄付s system Flattr.htm....



Valid HTML 4.01 Transitional Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org. Mostly passes. There were two "unknown せいにするs" in Google+ button code. Sigh.


If this page 原因(となる)s a script to run, why? Because of things like Google パネル盤s, and the code for the search button. Why do I について言及する scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....