View Issue Details

IDProjectCategoryView StatusLast Update
0004471JEDI VCL00 JVCL Componentspublic2008-10-10 05:09
Reporter_R_VitalAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.34 
Target VersionFixed in Version3.36 
Summary0004471: TJVDBRadioPanel don´t show corretly information when EVENTS GET/SET text are present
DescriptionMy English is bad, so, i'll try to make myself clear!

When TJvDBRadioPanel is linked in a field, and this same field have a code in events GET and SET Text to translate the information from the database to user, ex: MALE = M, FEMALE = F, the radiopanel don´t show any radiobutton marked. I have tried with others radiobuttons (VLC radiogroup for example, InfoPower, VGLib...) and that problem don´t occours. The Itens property contains "Male,Female" and the Values Property contains "Male,Female". Both are the same! If I change Property values to "M" and "F" the radiopanel show the information corretly but don´t save in database. I hope to find a solution very soon with your´s helps and i hope make my explanation very clear as possible with my "lazy" english =)

Regards from Brasil;

RvMello
Additional Informationprocedure TdmD.tblMembersSEXGetText(Sender: TField; var Text: String; DisplayText: Boolean);
begin
 If Sender.AsString = 'M' then
  Text := 'Male';
 If Sender.AsString = 'F' then
  Text := 'Female';
end;

procedure TdmD.tblMembesSEXSetText(Sender: TField; const Text: String);
begin
 If Text = 'Male' then
  Sender.AsString := 'M';
 If Text = 'Female' then
  Sender.AsString := 'F';
end;
TagsNo tags attached.

Relationships

has duplicate 0004470 resolvedobones TJVDBRadioPanel don´t show corretly information when EVENTS GET/SET text are present 

Activities

_R_Vital

2008-09-23 11:57

reporter   ~0014645

I solve the problem, simple adding the :

" and (FItemIndex<FButtons.Count) "

on line:

if (FItemIndex >= 0) then

So,

if (FItemIndex >= 0) and (FItemIndex<FButtons.Count) then

This is a entire procedure, for your´s ...

procedure TJvDBRadioPanel.UpdateButtons;
var I: Integer;
begin
  SetButtonCount(FItems.Count);
  for I := 0 to FButtons.Count - 1 do
    TGroupButton(FButtons[I]).Caption := FItems[I];
   if (FItemIndex >= 0) and (FItemIndex<FButtons.Count) then
  begin
    FUpdating := True;
    TGroupButton(FButtons[FItemIndex]).Checked := True;
    FUpdating := False;
  end;
  ArrangeButtons;
  Invalidate;
end;

jfudickar

2008-09-24 14:50

developer   ~0014669

Added your fix to svn.

Please have a look for it.

Greetings
Jens

obones

2008-10-10 05:07

administrator   ~0014814

This is in SVN

Issue History

Date Modified Username Field Change
2008-09-22 15:02 _R_Vital New Issue
2008-09-22 23:42 obones Relationship added has duplicate 0004470
2008-09-23 11:57 _R_Vital Note Added: 0014645
2008-09-24 14:50 jfudickar Note Added: 0014669
2008-09-24 14:50 jfudickar Status new => feedback
2008-10-10 05:07 obones Status feedback => resolved
2008-10-10 05:07 obones Fixed in Version => Daily / SVN
2008-10-10 05:07 obones Resolution open => fixed
2008-10-10 05:07 obones Assigned To => obones
2008-10-10 05:07 obones Note Added: 0014814