|
-
July 29th, 1999, 03:01 AM
#1
HELP! My choicecontrol moves by itself on a frame!!!
Hi!
Has anyone noticed a similar strange problem? The Choicecontrol component moves itself as the contents of it are changed! The whole story goes like this:
I have two Choicecontrol components on a frame. The first one (chTeam) is used for selecting a team and the other one is used for selecting an employee (chEmployee) from the selected team. Obviously, these components get their contents from a database, which in my case is Interbase 5.
As the selection from chTeam is made, a parameterized query is executed, the items of the chEmployee-Choicecontrol are removed and new items are set to that component. Now, without any visible reason, the chEmployee-Choicecontrol moves on a frame about 10 pixels left and about
the same amount upwards!!! I have the source code below, if it helps. I am using JBuilder2 Client/Server version with InterBase5 database. I have tried with JBCL's and AWT's Choicecontrols with the same results.
All the help is highly appreciated!
regards,
Tapio Martimo
public void addTeamEmps()
{
chEmployee.removeAll();
try
{
dMtask1.qryEmployees.close();
dMtask1.paramTeamname.setString("teamname", (String)chTeam.getSelectedItem());
dMtask1.qryEmployees.refresh();
dMtask1.qryEmployees.open();
for (int i = 0; i < dMtask1.qryEmployees.getRowCount(); i++)
{
chEmployee.add((String)dMtask1.qryEmployees.getString("FULLNAME"));
dMtask1.qryEmployees.next();
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|