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

翻訳前ページへ


大型の use: Introduction - Open Office Tutorials - opof6button AUTHOR'S MAIN SITE   > > > > >   TABLE OF CONTENTS for Open Office database tutorials.
MACROS section, Open Office tutorials.    Delicious Bookmark on Delicious    Recommend to StumbleUpon

Open Office Tutorials
A 大型の 開始する,打ち上げるing Button
"Hello World"

This page is one of several trying to help you get the most out of the splendid Open Office. They are 連合した with a larger 始める,決める concentrating on ooBase.

Remember that Open Office, 含むing ooBase, is 解放する/自由な! But don't let that fool you. And it's not new. Big organizations, 政府 and 非軍事の, are 可決する・採択するing it as their 基準 office 控訴... and saving million$, and still Getting The 職業 Done.

There's more about ooBase in the main 索引 to this 構成要素.

This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a 狭くする window. With most browsers, 圧力(をかける)ing 加える, minus or 無 while the 支配(する)/統制する 重要な (ctrl) is held 負かす/撃墜する will change the texts size. (大きくする, 減ずる, 回復する to default, それぞれ.) (This is more fully explained, and there's another tip, at my 力/強力にする Browsing page.)

Page contents © TK Boyd, Sheepdog ソフトウェア ®, 2/06-3/11.



Introduction

This tutorial shows how you can put a button on an Open Office page, and arrange for that button to put a "Hello World" message on the 審査する. I said "page" to be 非,不,無-明確な/細部. We will put the button on an ooWriter 文書, but it could also go on an ooCalc worksheet, or an ooBase form.

This tutorial was written using ooBase 見解/翻訳/版 3.0 on Windows XP, but many things should work the same way under other 地位,任命する 見解/翻訳/版 1 OpenOffice 取り付け・設備s, and under other operating systems. There are some strong 推論する/理由s to move to Open Office 3.1 if you want to use 大型のs with ooBase. Where the difference is important, you will be told.

I will try... really, I will... to Keep To The Point.

I tend in these tutorials to try to teach you the 原則s behind all that arises. With those 原則s, you are far better equipped to adapt what I've 現在のd, to 会合,会う your needs. In this essay, however, I will try to keep to the point, and 現在の a "cook-調書をとる/予約する" answer. But if I do that, will you 約束 to read the "原則s" 構成要素 I've moved どこかよそで? They explain things you need to understand to create and use 大型のs.

For our "Hello World" button, we need a 大型の. A 大型の is a 記録,記録的な/記録するd sequence of 指示/教授/教育s. There are other ways to 記録,記録的な/記録する one than the one we will use here. 大型のs can be 蓄える/店d in さまざまな places, not just the place I'm going to recommend here. When you know more, you'll be ready to start making your own choices. For now, "信用 me"?


The 計画(する)....

We need several pieces in place before everything will work.

The next four sections of this tutorial 演説(する)/住所 each of those in turn.


The 文書....

While what we are going to do can be done in almost the same way on an ooCalc spreadsheet, an ooBase form, an ooImpress 贈呈, for this tutorial we are going to do it on a "sheet of paper" in ooWriter.

I bet you didn't know that your wordprocessor (ooWriter) could create "computer programs", did you? But as soon as we put our button on the "page", we will have left behind the "word-加工業者 as modern typewriter" world. Don't worry about that. I just について言及する it, as in a moment I hope you'll find what we're going to do is pretty 冷静な/正味の, better than "mere word-過程ing."

So... open a new text 文書, using ooWriter. Put "My Button 事業/計画(する)" on the page, by 簡単に typing it as if you were doing a letter. Save the 文書 as "OpOf6Button". Let Open Office give it the usual 拡張 (.odt). (The 指名する comes from: "OPen OFfice tutorial example, level 6 (大型の work), BUTTON example."). What we are going to do will, of course, work with 文書s with other 指名するs... but there are places where it will help if you use my 指名するs for things, at least for the 目的 of working through the tutorial.)

That's it! For the 文書. Now to give it a button....


The Button....

Use the menu: 見解(をとる) | Toolbars | Form 支配(する)/統制するs. If "Form 支配(する)/統制するs" doesn't have a tick in 前線 of it, click on it. It may not be ドッキングする/減らす/ドックに入れるd as below (but you can change that by simple dragging. By the way, don't let the 指名する fool you: The toolbar doesn't let you 支配(する)/統制する (verb) the form. It 供給(する)s 支配(する)/統制するs (noun) that you may wish to place on a form you are designing.

You need the button that is second from the left on the Open Office 3.1 Form 支配(する)/統制するs 妨げる/法廷,弁護士業... a 始める,決める-square and pencil. It will be identified as "Design 方式 On/ Off" if you hover the mouse pointer over it.

FormControls

The "Design 方式 On/ Off" item in the toolbar is a toggle... it can be "up" or "負かす/撃墜する". Clicking it changes your 環境 between the two possible 明言する/公表するs:

"Ordinary" ooWriter work is done in the "normal" (design 方式 off) 明言する/公表する. You may, of course, 請け負う some "design" work during normal 操作/手術s, e.g. changing the font of your text.... but this is not what OpenOffice is talking about when it speaks of "design 方式".

When we are in OpenOffice's design 方式, we can 追加する things to the "文書" which change it from a mere "piece of paper" with 令状ing and graphics on it. We very 速く arrive at something which is almost a Windows "program", or "使用/適用".

Get yourself into "design 方式". The "Design 方式 On/ Off" icon will have a 国境 and a background. Many other icons on the toolbar will become "more 利益/興味ing"... have colors, etc, to show that they are no longer 無能にするd.

Find the "押し進める Button" icon. (At one point, it was the eighth icon in the illustration above.) Click on it, so that it is "負かす/撃墜する". Then move your mouse pointer so that it is over the "piece of paper" you have on your 審査する. Put your mouse button 負かす/撃墜する, move about 3 cm 権利 and 1 cm 負かす/撃墜する... you should see a box "drag out". 解放(する) your mouse button, and a button labeled "Button" should be 明白な on your "piece of paper", which I will henceforth call your "form", the Open Office 指名する for the "thing" we are working with.

If the button is in the wrong place, or the wrong size or 形態/調整, you can move or re-size it just by dragging, 支配する to all the usual 失望/欲求不満s of any new work in any 使用/適用. The size and placement don't really 事柄, but most of us want things to be "just so".

Click on the "Design 方式 On/ Off" icon to leave design 方式... many of the icons in the Form 支配(する)/統制する window will lose their colors. Try clicking on the button you put on your form. You should see the button go "負かす/撃墜する" and "up" as you click and 解放(する) it. Wow! But it's a start.

Save your work in the usual way.


The 大型の....

A little 予選 事柄: From the menu, invoke 道具s | 選択s. Within the "OpenOffice.org" part of the 選択s, on the "安全" page, you need to click the "大型の 安全..." button.

That opens a dialog where you need to 始める,決める the 安全 to "Medium", so that you can elect, on a 文書 by 文書 basis, to 許す 大型のs to run.

権利. That done? Onward.

There are two parts to the 残り/休憩(する) of our "Make a Hello World" button. First we will create the code which puts "Hello World" on the 審査する. Then we will "connect" that code to the button.

Most readers will not be starting this work from scratch. Don't be too alarmed about where I am putting the code, if it seems 半端物 to you. If you do things my way, the stuff you do today will be 含む/封じ込めるd in "OpOf6Button.oft", so the 残り/休憩(する) of your Open Office work won't be "汚染するd" by what you've done. If the day comes that you want some 大型の programming to be 普及(する), there are ways to 達成する that... and consequences you should by then understand.

- - - - - - - - -

Go to the menu 妨げる/法廷,弁護士業 of the window with your ooWriter 文書. Click 道具s | 大型のs | 組織する 大型のs | OpenOffice.org Basic

On the left is a window "大型の from" 名簿(に載せる)/表(にあげる)ing several places 大型のs can be. Click on the "+" in 前線 of our 文書. (It will be 名簿(に載せる)/表(にあげる)d as "OpOf6Button" if you saved it with the 指名する I told you to use.) That should 明らかにする/漏らす a folder called "基準". Click on "基準". It should become selected.

Now click the "New" button, to create the 爆撃する for a new 大型の, and 指名する it "OpOf6Button".

You should get the に引き続いて 骸骨/概要....

REM  *****  BASIC  *****

Sub Main

End Sub

Change "Main" to "OpOf6HW" (for "Hello World"), and then copy/paste to the に引き続いて between "Sub OpOf6HW" and "End Sub"

MsgBox "Hello World"

N.B.: When you type something like that by 手渡す, be sure to put a space after MsgBox

In the 大型の's window, use とじ込み/提出する | Save to save what you have, before anything goes wrong. (You 港/避難所't done anything "clever"... that "Save" is invoking an ordinary save. Because of how we've done things, you are saving your 大型の inside your 文書.)

Just below the menu in the 大型の editor's window, there's an icon with a green triangle pointing to the 権利. Its tooltip is "Run BASIC". Click it. A "Hello World" message box should pop up! Ta da!

But we want the button we made to invoke the 大型の, and it won't.... yet.

Just before we turn to 器具/実施するing that, let me tell you where I 設立する "MsgBox". In actual fact, I 設立する it the hard way... by 注ぐing over examples in the oooForum.org 大型のs discussion group. The 平易な way, the 権利 way to learn the language is to RTFM.... and the 手動式の is to be 設立する at....

ooBase 手動式の

... but as you know, "Real Men" (and women) would never do a sensible thing like that. But that's where it is, when you get desperate. The 一時期/支部 "Language of OpenOffice.org Basic" is 特に helpful.


The Event....

井戸/弁護士席, so far so good. I've Kept To The Point pretty 井戸/弁護士席 (for me). At this 行う/開催する/段階 I will not resist a digression. You really need to understand that Open Office programming is 反対する oriented. The button is an "反対する". As I've said MUCH more about this どこかよそで, I won't say much more here.

反対するs have 所有物/資産/財産s, and they have event handlers. We'll come 支援する to event handlers in a moment.

You need to learn how to get at any 反対する's 所有物/資産/財産s, and how to 始める,決める its event handlers. Not too hard, happily, just not 特に obvious.

Use the menu of your ooWriter 文書 to check 見解(をとる) | Toolbars. Make sure that the form design toolbar is switched on.

FormDesign bar

The "Design 方式 On/ Off" button on this toolbar is just a duplicate of the one you were using earlier; it isn't different. Make sure your form is in design 方式, so that the icons are colored.

There's a "FORM 航海士" icon. It is a window with a tiny compass. Fifth icon on the Open Office 3.1 toolbar. (Don't 混乱させる it with the more general "航海士" (just a compass) icon you may be familiar with.)

Click the Form 航海士 icon, and a Form 航海士 window should come up, with the elements of your form shown. You may need to click on "+" 調印するs to open the lower 支店s of the tree. 権利-click on the "PushButton" item, click on "所有物/資産/財産s", and a やめる busy window will open, with two tabs: General and Events. We need "Events". (By the way... you can also 接近 this window by 権利 clicking on the button and clicking "支配(する)/統制する", if it is not already ticked. (If it IS ticked, the button's 所有物/資産/財産s window should already be showing somewhere on your 審査する... as long as you are in the Design 方式. But the Form 航海士 is useful for seeing the 反対する 階層制度s, and for getting at things you can't さもなければ easily reach.))

Hopefully, you are now looking at the button's Events... "Before 開始するing...", etc.

Click on the button to the 権利 of "Mouse button 解放(する)d."

In the window that 続いて起こるs, click on the "大型の" button below the "割り当てる:" label, over at the 権利.

認める the things in the "Library" パネル盤? They are what you saw earlier when you created your 大型の. Click the "+" by "OpOf6Button.odt", and then the "+" by the "基準" which then appears, and your should see "OpOf6Button" in the "Library" パネル盤. Click on it ( said things were not obvious!), and "OpOf6HW" should finally appear in the "大型の 指名する" パネル盤, both of them selected. Click "承認する" to say that you want to 割り当てる that 大型の to the "Mouse button 解放(する)d" event. You also need to "Okay" your way out of the "割り当てる 活動/戦闘" window. Once you've done that....

Leave "Design 方式" again, and try clicking on the button. The "Hello World" message box should appear. There was always a "mouse button 解放(する)d" event arising when you clicked on the button, but until now, the code (大型の) you wrote wasn't 割り当てるd as the handler for that event. Now it is. When the event occurs, your 大型の 遂行する/発効させるs.

Save your 文書. (I have to 収容する/認める: Once, 地雷 went a bit "nuts" around now. I'd かもしれない not "Okayed" out of the "割り当てる 活動/戦闘" window. Even so, 結局, without changing anything I've told you, things settled 負かす/撃墜する. It just took a few cycles of の近くにing the 文書, re-開始 it, re-doing what I thought I'd done....)


First 一連の会議、交渉/完成する of 結論するing 発言/述べるs....

It may seem that the fifty paragraphs or so of this essay have not 遂行するd very much... but what we have done visits many of the 批判的な elements underlying anything that happens inside a Windows program. You have a few other major 問題/発行するs to master, but not many. Most of the 残り/休憩(する) of your learning is filling in 詳細(に述べる)s. It is as if you've learned most of a foreign language, and now have only to 拡大する your vocabulary.


Some 半端物s and Ends....

In the stuff that we've done so far, there are a number of things you may want to know, or need to notice...

*** Suppose you want a particular 大型の to "解雇する/砲火/射撃" each time you open a 文書? How you go about that is 演説(する)/住所s in my tutorial about where 大型のs are 蓄える/店d, in the "虫垂" at the 底(に届く), at the moment.

*** There are many places where I've chosen a 指名する for something. In other places, I've 許すd OpenOffice's choice to stand. 明白に, I chose the 文書's 指名する, the 大型の "folder"'s 指名する, and the 大型の's 指名する. いっそう少なく 明白に, "Button" is the 指名する of our PushButton. There are other things which have "frozen" 指名するs, e.g. "MsgBox" is "built into" the system, is reserved, and cannot be changed.

*** The language is 事例/患者 極度の慎重さを要する. Change "Button" to "button" in some places and the program stops working. There are some things you CAN type in any 事例/患者, but if in 疑問... use the "権利" 事例/患者... 特に for 指名するs of things. Remember this when you come to use 大型のs in 関係 with databases. If you want to do something with the (米)棚上げする/(英)提議する "Status", then you can't 言及する to it as "status".

*** Be 感謝する for the "syntax 最高潮の場面ing" that the 大型の editor 供給するs. The colors help you see what the computer will make of something. Type REM and a space in 前線 of one of the lines. See the color disappear? The REM has turned the line into a REMark... ignored by the system. If "類似の" lines don't have 類似の colors, they are not as 類似の as you think they are. By the way: Another way to make something a 発言/述べる: Put an apostrophe in 前線 of it.


A tedious 詳細(に述べる)....

Good news/ bad news. When I first wrote this I was using a 見解/翻訳/版 3.0 Open Office 取り付け・設備. Under that 見解/翻訳/版, you couldn't save a 大型の within an ooBase form. That wasn't not a big 取引,協定, though, if you knew the workaround. (Not necessary since Open Office 見解/翻訳/版 3.1) (What you needed to do was to save the 大型の to an ooWriter 文書, 正確に/まさに as 述べるd above. When you'd done that, you could 始める,決める up an ooBase form, put a button on it, and 割り当てる the 大型の as the event handler for a click of the button. You just had to be careful to have the ooWriter 文書 open at any time you are wanting to use the button.) Happily, from Open Office 見解/翻訳/版 3.1 you can save a 大型の within a database, i.e. within the database's .odb とじ込み/提出する.


A little 特別手当....

You can skip over this to the general stuff at the 底(に届く) of the page, "編集(者)の philosophy", etc, if you wish. But I thought you deserved a little 特別手当.

Just before the...

MsgBox "Hello World"

...that is the whole of your 大型の at the moment, 追加する....

Beep
Wait(200)
Beep
Wait(500)
Beep
MsgBox "Hello World"

If all is 井戸/弁護士席 with the way your sound is 始める,決める up, you will hear three beeps, separated by intervals of 200 milliseconds and 500 milliseconds. Not ロケット/急騰する science, but maybe fun. If you don't get any sound, my advice is to forget about this. There are just too many things 完全に outside the 操作/手術 of the Open Office 大型の to fool around with. Is your (衆議院の)議長 muted? Etc, etc.

Final 結論するing 発言/述べるs....

I hope you 設立する that informative? If you did, you may find the に引き続いて tutorials useful, too:





編集(者)の Philosophy

I dislike 'fancy' websites with more 関心 for a flashy 外見 than for good content. For a pretty picture, I can go to an art gallery. Of course, an attractive 場所/位置 WITH content deserves 賞賛する... as long as that pretty 直面する doesn't cost download time. In any 事例/患者....

I am trying to 現在の this 構成要素 in a 判型 which makes it 平易な for you to USE it. There are two 面s to that: The way it is 分裂(する) up, and the way it is 地位,任命するd. See the main 索引 to this 構成要素 for more (警察などへの)密告,告訴(状) about the way it is 分裂(する) up, and the way it is 地位,任命するd.


広告 from page's editor: Yes.. I do enjoy 収集するing these things for you... I hope they are helpful. However.. this doesn't 支払う/賃金 my 法案s!!! If you find this stuff useful, (and you run an MS-DOS or Windows 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!

PLEASE >>> Click here to visit editor's Sheepdog ソフトウェア (tm) freeware, shareware pages <<< PLEASE


If you liked this ooBase tutorial, see the main 索引 for (警察などへの)密告,告訴(状) other help from the same author.

Editor's email 演説(する)/住所. Suggestions welcomed!     - - -    Want a 場所/位置 hosted, or email? I like 1&1's services.




Valid HTML 4.01 Transitional Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org


One last bit of advice: Be sure you know all you need to about spyware.

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