garg
2006-07-11 07:35:37 UTC
Hello,
I'm trying to create an LTextButton and place it inside a specific
pane, after running the code the button doesn't appear
here's the code (the tmpBut->PutInside was omitted)
LStream* l = new LStream();
SPaneInfo paneInfo = {0, 115, 16, true, true, {0,0,0,0}, 14, 91 + 26 ,
0, FlowsScroller};
SControlInfo conInfo;
conInfo.valueMessage = kSwitch2Panel1;
conInfo.value = 0;
conInfo.minValue = 1; //?
conInfo.maxValue = 0; //?
ResIDT textTraitsID = Txtr_SystemFont;
SInt16 selectedStyle = bold || underline;
LStr255 lButText = "abcd";
l->WriteData(&paneInfo, sizeof(SPaneInfo));
l->WriteData(&conInfo, sizeof(SControlInfo));
l->WritePString(lButText);
l->WriteData(&textTraitsID, sizeof(ResIDT));
l->WriteData(&selectedStyle, sizeof(SInt16));
l->SetMarker(0, streamFrom_End);
LTextButton* tmpBut = new LTextButton(l);
I'm sure the problem is within the LStream, but couldn't figure out
what it is
I also tried creating the LTextButton using the default ctor and then
apply to it some attributes, but no luck there either
does anyone know how to solve this?
thanks in advance
Elad
I'm trying to create an LTextButton and place it inside a specific
pane, after running the code the button doesn't appear
here's the code (the tmpBut->PutInside was omitted)
LStream* l = new LStream();
SPaneInfo paneInfo = {0, 115, 16, true, true, {0,0,0,0}, 14, 91 + 26 ,
0, FlowsScroller};
SControlInfo conInfo;
conInfo.valueMessage = kSwitch2Panel1;
conInfo.value = 0;
conInfo.minValue = 1; //?
conInfo.maxValue = 0; //?
ResIDT textTraitsID = Txtr_SystemFont;
SInt16 selectedStyle = bold || underline;
LStr255 lButText = "abcd";
l->WriteData(&paneInfo, sizeof(SPaneInfo));
l->WriteData(&conInfo, sizeof(SControlInfo));
l->WritePString(lButText);
l->WriteData(&textTraitsID, sizeof(ResIDT));
l->WriteData(&selectedStyle, sizeof(SInt16));
l->SetMarker(0, streamFrom_End);
LTextButton* tmpBut = new LTextButton(l);
I'm sure the problem is within the LStream, but couldn't figure out
what it is
I also tried creating the LTextButton using the default ctor and then
apply to it some attributes, but no luck there either
does anyone know how to solve this?
thanks in advance
Elad