Groupを解除せずにGroupの内容を操作 | |||
グループ化したボタンやフィールド、imgやgrcをグループから出したり、グループに新たにimgやgrcを追加するには、いったんグループを解除してもう一度それらをグループ化しなければならないと思っていました。過去のRunRevのログにもそのように書かれています。 しかし、これをスクリプトで実行すると若干のタイムラグがPen3あたりだと生ずるのです。しかも、グループに含まれていたアイテムを何らかの方法で記録しておかなければ再グループできません。
削除も同じ方法でできます。しかし、削除の時はofでなければならないようです。inを使うとグループごと削除されました。(v2.61, build108) |
|||
次は、エレメントを直接既存のグループに移動する方法です。(2016年8月14日) Layer | Control 次のように書くことで、"fish"を"meat"のグループに加えることができます。(v5.5.0 build1479)
この"fish"を"meat"のグループから出すには次のように書きます。
|
|||
その他(2005年8月10日) オンラインマニュアルによれば、グループに名前をつけるにはいったんエレメントをグループ化した後でthe last groupなどによってグループを指定して名前をつけるように書いてありますが、次のスクリプトで、いきなりグループを作り名前をつけることができます。
このようにして作られたグループは空のグループです。しかし、次のように書くことはできません。
しかし、次のようなことはできてしまいます。
|
|||
検索したところ、次のように既存のオブジェクトをグループの中にコピーすることもできるようです。
Simply use the following to get an object that is not in a group, into
a copy graphic "oval" to group "groupNameHere" then you need to delete the original control that is not in the group. -Mark Talluto On Wednesday, January 16, 2002, at 08:30 AM, Rick Rice wrote:> How do you add objects to a group?
|
|||
スクリプトのStart Editing、Stop Editingは、以下のような時のためにあるみたいです。 Re: Adding objects to groups On Fri, 30 Nov 2001 16:02:19 >Jeanne, >I've never whinged about lack of information on how to create objects
in an Ben, from this post, I'm not sure whether you're just commenting on a
lack of Here's how I do it: 1. Copy the existing object to the clipboard. 2. Select the group you want to add the object to. 3. Select *Edit Group* in the Object menu. 4. Paste the object from the clipboard (it now becomes part of the group). 5. Select *Stop Editing Group* in the Object menu. 6. Delete the original object.
|
|||
レイヤーを動かしてグループ化することもできるようです。 I believe the trick is something like this: set the relayerGroupedControls to true Brian |
|||
Here's my control outlilne: Layer | Control If I execute the following statement: set the relayerGroupedControls to true All of a sudden, group "fruit" is now a sub group of group
"meat" and looks Layer | Control
Layer | Control |
|||
Hi Chip - I've struggled with this before and from memory you can't usually do it in a single step. You essentially have to reorder objects or groups (by moving them to the top of the group) in such a way that the object/group you're interested in is forced down through the layers into the desired position. So in your example I think you would... 1. set the layer of btn "fred" to 2 ...ending up with your desired layering sequence. HTH, Terry... |
|||
Well, I figured it out..and boy is it simple.. When relayering a control, you first should find out if it is contained within a group. If so then start editing the group. Identify the control you wanted to move then simply: get the layer of tControlID Note-- I said 'one level' not one layer. This is an important distinction. Pretty simple. I was focussed on setting layer numbers. This is much function stsLongOwnerID pObjID,pOpt_NumLevels -Chipp |