Sure, my mistake was that I created a container control containing control array’s. That should not be done, in my case at least. Maybe there is anybody else who could work with this, but this caused with me that, once the containerControl was loaded, all values for the controls were ‘forgotten’, thus moving mouse over the BevelControl it lost the link to the picture.
So, I created a Container control, named DistPointer, containing the bevelbutton and dimentioned the ContainerControl as DistGroup:
Dim Distgroup as new DistPointer (Distpointer is the Container Control)
Dim DistIndex as Integer
Then I loaded the ContainerControl on my page and set the values where the Container should come on the screen:
DistIndex = DistIndex + 1
Distgroup = new DistPointer
DistGroup.EmbedWithin(self,10,10,31,36)
Distgroup.Left = x
Distgroup.Top = y
In the ContainerControl I created a method (NewDist) which does the rest inside the Container control:
Called with:
Distgroup.NewDist(WhateverYouwantValueString)
Inside the Method of the Container Control Distgroup (=DistPointer):
BevelButton.Icon = picture (any name of a picture inside the project)
BevelButton.helpText = “WhateverYouwantValueString”
I used the helptag to display the text I want to show when someone moves the mouse over it and I do not want to disturb the picture with text)
This way I use to put a tiny bevelbutton (31x36 pixels) on a worldmap with the picture of my choice to show the type of event. When people wants to see what is going on, they hoover over the bevelbutton and the helptag will show a short message. When they need to have more info about the event you can do that by sending a CommaSeparatedValueString in the Distgroup.NewDist(CommaSeparatedValueString,DistIndex)
Within the method inside the container control you can make a split:
sub NewDist(CommaSeparatedValueString,DistIndex)
Dim cell() as string
cell()=split(CommaSeparatedValueString,",")
You will get the number of comma’s + 1 number of cells
ie. “This is a test”, “Info is always available”, “Name something”) will give 3 cells:
cell(0) = “This is a test”
cell(1) = “Info is always available”
cell(2) = “Name something”
You can assign the next values to the BevelButton:
BevelButton.Index = DistIndex
BevelButton.Helptag = cell(1)
to show a messagebox with more info when they press on the button:
msgbox(cell(0)+ ". " + "When you need it, " + cell(1) + ". “+” Or if this is not enough: "+cell(2))
Ofcourse the sequence you want to print the cell’s is up to you.
The Index (= DistIndex) you can use to point to an index of a global available array and execute some other method inside the Container Control. You can execute this with the action event of the BevelButton.
This is my solution and it works perfect, each ContainerControl works as a piece on its own, very nice.
I hope that this is what you meant,