Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Group + Display (Read 3839 times)
Patrick
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Apr 3rd, 2006
Group + Display
May 16th, 2006 at 1:31pm
Print Post  
Hi , i am trying to do groups attached boxes. It works but i dont know why but it takes an event before the group display correctly. In other case, it just display the master item i dont know why.. here's the code.

PROCEDURE CreationGroupe(ObjMaster,oboxpic,oboxjauge)

ogroup est un objet Automation dynamique
ogroup = :goObj>>CreateGroup(ObjMaster)
ogroup>>AttachProportional(oboxpic,5, 10, 95, 75)
ogroup>>AttachProportional(oboxjauge, 5, 75, 95, 100)
oboxpic>>LoadPicture(ComplèteRep(fRepExe())+"img\"+"USINE.BMP")

:nbgroupe = :goObj>>Groups()>>Count()
ogroup>>Tag = :nbgroupe
ObjMaster>>Tag = :nbgroupe
oboxpic>>Tag = :nbgroupe
oboxjauge>>Tag = :nbgroupe
:nbgroupe = :nbgroupe + 1
RENVOYER ogroup

Now check the creation first state of the box. http://trimplus.com/MindFusion/FirstState.PNG
And after a selection.
http://trimplus.com/MindFusion/SecondState.PNG


Got an idea to fix that out?


  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Group + Display
Reply #1 - May 16th, 2006 at 5:16pm
Print Post  
Hi,

If the problem those screenshots show is that the label box is not shown until the group is selected, probably the label's Z index is lower than the container's one. Try creating the container boxes before the label ones, or explicitly set the ZIndex properties of labels to be higher than the containers.

I hope that helps,
Stoyan

P.S. I am curious what is that programming language that you use ?
  
Back to top
 
IP Logged
 
Patrick
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Apr 3rd, 2006
Re: Group + Display
Reply #2 - May 16th, 2006 at 5:56pm
Print Post  
I tried both your ideas , but it's not seem to work. I am actually creating the main (master) box first , pic and jauge after. i see the container and the pic but not the jauge until i move or select the "group" , weird..


As you are curious i am using Windev 10 by PcSoft.
Not a common language but really nice in what we are investigating.

So if you got clues why it happens... drop a line Tongue


Here the indications

SI cligne="[MACHINE]" ALORS
   cligne = fLitLigne(hwnd)
   TANTQUE cligne[[1]] <> "[" ET cligne <> "" ET cligne <> EOT
   oligneCmd:InitLigne(cligne)
   MemAjoute(czmMachines,oligneCmd:GetTrigVal("Machine"),cligne)

  //Create main object
  objMaster = MyFlowMach:CreationBoite(X,0,200,200)
  objMaster>>ZIndex = 0
  objActif = objMaster
  objMaster>>Text = oligneCmd:GetTrigVal("Machine")
  objActif>>Text = oligneCmd:GetTrigVal("Machine")
  //Create pic object
  oboxpic= MyFlowMach:CreationBoite(X,10,100,90)  oboxpic>>LoadPicture(ComplèteRep(fRepExe())+"img\"+"USINE.BMP")
  oboxpic>>Text = "MACHINE"+Nom
  oboxpic>>ZIndex = 1
  //Create jauge object
  oboxjauge = MyFlowMach:CreationBoite(100,100,0,0)
  oboxjauge>>FillStyle = 2
  oboxjauge>>FillColor = 20
  oboxjauge>>Text = " % "
  oboxjauge>>ZIndex = 2

  NewGroup = MyFlowMach:CreationGroupe(objMaster,oboxpic,oboxjauge)
  cligne = fLitLigne(hwnd)
  objMaster>>PicturePos = 4
  objMaster>>TextStyle = 21 //tsTop
  X = X + 100
FIN

And the same code as previous...

PROCEDURE CreationGroupe(ObjMaster,oboxpic,oboxjauge)

ogroup est un objet Automation dynamique
ogroup = :goObj>>CreateGroup(ObjMaster)
ogroup>>AttachProportional(oboxpic,5, 10, 95, 75)
ogroup>>AttachProportional(oboxjauge, 5, 75, 95, 100)
oboxpic>>LoadPicture(ComplèteRep(fRepExe())+"img\"+"USINE.BMP")

:nbgroupe = :goObj>>Groups()>>Count()
ogroup>>Tag = :nbgroupe
ObjMaster>>Tag = :nbgroupe
oboxpic>>Tag = :nbgroupe
oboxjauge>>Tag = :nbgroupe
:nbgroupe = :nbgroupe + 1
RENVOYER ogroup

Here you see, i create my box in the good order and also affect the z-order higher than 0
0 = master.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Group + Display
Reply #3 - May 17th, 2006 at 6:13am
Print Post  
The problem might be that calling the group's Atatch* methods does not immediately move the subordinated boxes. The label position will be updated only when the master box position is set, so try calling objMaster>>MoveTo() after creating the group.

Stoyan
  
Back to top
 
IP Logged
 
Patrick
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Apr 3rd, 2006
Re: Group + Display
Reply #4 - May 17th, 2006 at 12:31pm
Print Post  
Yes, i did this test this morning and it seems to work , after creating the group. i affect the x,y of the master to the start coords and the "jauge" object is visible (objMaster>>Moveto(X,0) Thanks for all.


  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint