このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
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-6/09.
This page is one of a group about using 大型のs in Open Office. It is really, really simple compared to the others, but does assume that you know a bit about using 大型のs. If you don't, then I'd 示唆する that you start with my Introduction to OOP, Events and 大型のs.
One of the things which has kept me from embracing 大型のs is that there is an 総計費. You have to manage your 大型のs. They have to be kept where they are accessible... but not so "accessible" that they are underfoot when not needed... or leave "broken bits" in the wake of a not 完全に successful 実験.
I'm not 完全に happy with my "解答" to the problem, but give it a try. It has 長所s which may not be すぐに evident. I wrote my first computer program in 1968, and have developed some sense of what 作品, what doesn't. There are many possible 解答s, each with プロの/賛成のs and 反対/詐欺s. What I 提案する in the に引き続いて should keep your system manageable, 蓄積するing "プロの/賛成のs", and 避けるing "反対/詐欺s".
My system is fully explained in the other essays that were 名簿(に載せる)/表(にあげる)d a the start of this page. The example 始める,決める out below also uses the system I like.
By the way, this tutorial was written using ooBase 見解/翻訳/版 3.0 on Windows XP, but things should work the same way under other 地位,任命する 見解/翻訳/版 1 OpenOffice 取り付け・設備s, and under other operating systems. 広大な/多数の/重要な news: From 見解/翻訳/版 3.1, you can 蓄える/店 大型のs in an ooBase database, something you couldn't do before. Open Office 昇格s have almost always gone 滑らかに for me. If you are in a position to take the 必然的な 危険s, I would recommend that you 昇格 to 見解/翻訳/版 3.1.
You must have enabled 大型のs! To do that, from the main Open Office menu 妨げる/法廷,弁護士業, invoke 道具s | 選択s. Within the "OpenOffice.org" part of the 選択s, on the "安全" page, you need to click the "大型の 安全..." button, and 始める,決める the 安全 to "Medium" or lower.
In the first part of this tutorial, we're going to put two buttons on the 文書, just to 最高潮の場面 something about how the 大型の debugging 環境 作品.
Start a new ooWriter 文書.
Make the "Form 支配(する)/統制するs" toolbar 明白な. Turn the "Design 方式" "on".
Put two buttons on the page. Make their 指名するs "buMagenta" and "buCyan", and their labels "Magenta" any "Cyan".
Save your "page"; call it "opof6MultiSub" (OPen OFfice, tutorials section 6 (大型の programming), lesson "MULTIple SUB決まりきった仕事s").
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 "opof6MultiSub" if you saved it with the 指名する I told you to use.) That should 明らかにする/漏らす a folder called "基準". Click on that, so that it becomes "selected".
Now click the "New" button, to create a module for some new 大型の code. 指名する it "opof6Multi". (You could just leave the 指名する "Module 1", but if you do, and you see that 指名する どこかよそで, you can't be sure if it is a different "Module 1", of the one you thought you were working with.)
You should get the に引き続いて 骸骨/概要....
REM ***** BASIC ***** Sub Main End Sub
"Sub" is short for "subroutine", i.e. a chunk of code.
Change the word "Main" to "MakeMagenta". (Unlike some programming languages you may be familiar with, there's no need to have a "Main" subroutine.
Use copy/paste to put the に引き続いて 構成要素 between "Sub MakeMagenta" and "End Sub".
薄暗い oThisDoc As 反対する 薄暗い oForms as 反対する 薄暗い oForm as 反対する 薄暗い oPushButton As 反対する oThisDoc = thisComponent.getDrawPage() oForms =oThisDoc.getForms() oForm = oForms.getByName("基準") oPushButton = oForm.getByName("buMagenta") oPushButton.backgroundcolor = &HFF00FF
Before you try to play with that, save what you've got, just in 事例/患者. You can use the とじ込み/提出する | Save in the window where you edit the 大型の code. It 単に saves your ooWriter 文書... the 大型のs, if done as I've 示唆するd, are "inside" that.
公式文書,認める also: You don't need to の近くに the 大型の code editing window at any time during this work.
And 公式文書,認める, sigh: If you are using OpenOffice 3.1, that should work. If you are using OpenOffice 3.2, change the last part of the....
oForm = oForms.getByName("基準")
...line to....
oForm = oForms.getByName("Form")
At this time, you may want to arrange the three windows you are 現在/一般に using.....
... so that you can see "everything" (or at least bits of each, 支配する to scrolling!) at once: The two buttons, the text you are reading now, and the 大型の code.
Getting 支援する to working with the 大型の....
In the 大型の code editing window, just below the menu 妨げる/法廷,弁護士業, here is a pulldown which is 述べるd as "現在の Library" if you hover your mouse, and to the left of that a stack of paper with a 負かす/撃墜する-pointing blue arrow, and to the left of that a button with a 権利-pointing green arrow. (Hover your mouse, and that button is 述べるd as "run BASIC".)
Click that button now. You should see buMagenta turn magenta.
Change...
oPushButton.backgroundcolor = &HFF00FF
...to...
oPushButton.backgroundcolor = &H0000FF
... and click the "runBasic" button again, and you should see buMagenta turn blue.
Don't worry... we're going to take the 大型の, etc, 今後 in a moment. But first a little 詳細(に述べる)....
In....
oPushButton.backgroundcolor = &H0000FF
We are changing the BackGroundColor 所有物/資産/財産 of our button. The color is "coded" with a number. If we'd said.....
oPushButton.backgroundcolor = 255
... I bet you'd be やめる happy? Try it. It is another way of making the button blue. So what's this "&H0000FF" stuff?
The "&H" bit says that we're going to 令状 a number, but in hex instead of the system we 普通は use. "System we 普通は use???" Yes... there are lots of ways to 令状 a number. Twelve is 12 is a dozen, isn't it? Hex is just another way. (12 is written in hex as C !)
But you don't need to know much about hex to do colors.
Red is &HFF0000, Green is &H00FF00, Blue is &H0000FF
In each 事例/患者, you start with "&H" to say that what's coming is in hex.
Then you have three pairs of characters. Each can be any combination of digits or letter up to F.... so all of the に引き続いて are okay:
The first pair of characters 決定するs how much red there is in your color... 00 resulting in no red, FF resulting in 最大限 red. The second pair 決定するs how much green is in your color, and the third pair 決定するs how much blue there is in your color.
At the moment, we can change the color of buMagenta... but when we change the color, we can't change it 支援する without changing the 大型の code. And the button on the ooWriter 文書 doesn't do anything. We're going to 直す/買収する,八百長をする both of those problems.
Although it won't, by itself, 直す/買収する,八百長をする either problem, 挿入する the に引き続いて in the 大型の editing window, at the 最高の,を越す, just below the "REM *** BASIC ***". Yes- it is very 類似の to the other code you already have there, and, yes- when you've done this the "runBasic" button no longer runs your 初めの code... it now runs the new subroutine, "MakeCyan".
Sub MakeCyan 薄暗い oThisDoc As 反対する 薄暗い oForms as 反対する 薄暗い oForm as 反対する 薄暗い oPushButton As 反対する oThisDoc = thisComponent.getDrawPage() oForms =oThisDoc.getForms() oForm = oForms.getByName("基準") oPushButton = oForm.getByName("buMagenta") oPushButton.backgroundcolor = &H00FFFF End Sub
Try the "runBasic" button, and buMagenta's color should go cyan
Make sure you are in the design 方式 in the ooWriter window. If you are, 権利 clicking on the button labeled "Cyan" should bring up a menu with "支配(する)/統制する" on it. If there is no "tick" in 前線 of it, click it. The menu will go away, but "支配(する)/統制する" will now be ticked. When 支配(する)/統制する is ticked, and the 文書 is in design 方式, then somewhere on your 審査する should be a window 肩書を与えるd "所有物/資産/財産s". As you have just clicked on buCyan, you will be looking at the 所有物/資産/財産s window for buCyan. It has two tabs. You want the "Events" tab.
Click on the button to the 権利 of "Mouse button 圧力(をかける)d." (It has "..." in it.)
In the window that 続いて起こるs, click on the "大型の" button below the "割り当てる:" label, over to the 権利.
認める the things in the "Library" パネル盤? They are what you saw earlier when you created your 大型の. Click the "+" by "opof6MultiSub.odt", and then the "+" by the "基準" which then appears, and your should see "opof6Mulit". Click on that, and you should see MakeCyan and MakeMagenta in the "MacroName" pane, the former 存在 selected. Click "承認する" to say that you want to 割り当てる the MakeCyan 大型の to buCyan's Mouse Button 圧力(をかける)d event. Click "Okay" to leave the "割り当てる 活動/戦闘" window.
With the "所有物/資産/財産s" window still open, and your ooWrite 文書 still in design 方式, click on buMagenta. The "所有物/資産/財産s" window will now be showing (警察などへの)密告,告訴(状) about buMagenta, showing the event handler assignments (非,不,無 so far) for that button. Repeat (almost) what we did above to 割り当てる "MakeMagenta" the event handler for buMagenta's Mouse Button 圧力(をかける)d event.
Now take your ooWriter 文書 out of design 方式!
Clicking on buCyan should make buMagenta go cyan, and clicking on buMagenta should make it go... magenta!
In a moment, we'll tweak things so that both buttons change color when either is clicked, but that's beside the point.
The (first) point is that you have a 文書 with more than one 大型の 蓄える/店d in it, more than one subroutine of ooBasic code which can be invoked by 使用者s of your 文書.
Save what you have!
Now I'm going to show you something "trivial", but the 決意/決議 of a mystery you may have noticed.
Use buMagenta, on the ooWriter 文書, to make the button magenta. Now go to the 大型の code editing window, and click the "runBasic" button. buMagenta should go cyan. You have a way to quickly 実験(する) the MakeCyan subroutine. How can we 実験(する) the MakeMagenta subroutine quickly and easily?
The "runBasic" button runs the subroutine at the 最高の,を越す of the window. Use copy/ paste to 配列し直す things....
REM ***** BASIC ***** Sub MakeMagenta 薄暗い oThisDoc As 反対する 薄暗い oForms as 反対する 薄暗い oForm as 反対する 薄暗い oPushButton As 反対する oThisDoc = thisComponent.getDrawPage() oForms =oThisDoc.getForms() oForm = oForms.getByName("基準") oPushButton = oForm.getByName("buMagenta") oPushButton.backgroundcolor = &HFF00FF End Sub Sub MakeCyan 薄暗い oThisDoc As 反対する 薄暗い oForms as 反対する 薄暗い oForm as 反対する 薄暗い oPushButton As 反対する oThisDoc = thisComponent.getDrawPage() oForms =oThisDoc.getForms() oForm = oForms.getByName("基準") oPushButton = oForm.getByName("buMagenta") oPushButton.backgroundcolor = &H00FFFF End Sub
Click the "runBasic" button, and you should see buMagenta go magenta again. 明白に, you won't want to be endlessly re-ordering the subroutines (大型のs) in the 大型の library, but to do some work on a subroutine, you can move it to the 最高の,を越す, and use the "runBasic" button for quick 実験(する)ing, until the need arises to change over and work on a different 大型の.
While everything I 手配中の,お尋ね者 to illustrate has already been covered, the way the 文書's buttons behave is a bit 半端物. It is a trivial 演習 to 延長する the 大型のs so that both buttons change color when you click one or the other. You might want to try to 変える the 大型のs yourself. If you are 敗北・負かすd, the code appears just a little さらに先に 負かす/撃墜する this page.
If the code is opaque to you, you might want to read my tutorial "Miscellaneous thoughts on 大型のs" in which a checkbox was put on an ooWriter page. The code is 類似の to our button code, but what was happening was 診察するd in greater 詳細(に述べる) there.
Don't read on, unless you want to see "the answer"!......
Switching the color of two buttons....
REM ***** BASIC ***** Sub MakeMagenta 薄暗い oThisDoc As 反対する 薄暗い oForms as 反対する 薄暗い oForm as 反対する 薄暗い oPushButton,oPushButton2 As 反対する oThisDoc = thisComponent.getDrawPage() oForms =oThisDoc.getForms() oForm = oForms.getByName("基準") oPushButton = oForm.getByName("buMagenta") oPushButton2 = oForm.getByName("buCyan") oPushButton.backgroundcolor = &HFF00FF oPushButton2.backgroundcolor = &HFF00FF End Sub Sub MakeCyan 薄暗い oThisDoc As 反対する 薄暗い oForms as 反対する 薄暗い oForm as 反対する 薄暗い oPushButton,oPushButton2 As 反対する oThisDoc = thisComponent.getDrawPage() oForms =oThisDoc.getForms() oForm = oForms.getByName("基準") oPushButton = oForm.getByName("buMagenta") oPushButton2 = oForm.getByName("buCyan") oPushButton.backgroundcolor = &H00FFFF oPushButton2.backgroundcolor = &H00FFFF End Sub
That's about it, for this tutorial. I hope it will have made you inclined to return to the main page of my Open Office tutorials, and 接近 another.
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.
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.
Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org
. . . . . P a g e . . . E n d s . . . . .