hello,
i have a little problem with the listbrowser-gadget and the horizontal-props.
the size of the horizontal-slider-knob is too little when the x-size of all columns is (some points ) bigger then the window (gadget). then you can scroll very large and at the end you can see the columns again.
in the first i think i have a problem with the code in my program, but i also can produce this problem with the example-program "twocolumn" from the sdk. is this a bug in the listbrowser-gadget or is my use of the gadget-parameters wrong???
i modify only this:
deaktivate AUTOFIT
activate HorizontalProp
modify the sizes of window and columns.
here the code-lines (sorry i can not add an attachment):
columninfo = IListBrowser->AllocLBColumnInfo(2,
LBCIA_Column, 0,
LBCIA_Title, " GUI Attributes",
LBCIA_Width, 290,
LBCIA_Column, 1,
LBCIA_Title, " BOOL",
LBCIA_Width, 120,
TAG_DONE);
return IIntuition->NewObject(NULL, "window.class",
WA_ScreenTitle, "ReAction Example",
WA_Title, "Two Column Example",
WA_DragBar, TRUE,
WA_CloseGadget, TRUE,
WA_SizeGadget, TRUE,
WA_DepthGadget, TRUE,
WA_Activate, TRUE,
WA_InnerWidth, 320,
WA_InnerHeight, 300,
WINDOW_IconifyGadget, TRUE,
WINDOW_IconTitle, "Iconified",
WINDOW_AppPort, AppPort,
WINDOW_Position, WPOS_CENTERSCREEN,
WINDOW_Layout, IIntuition->NewObject(NULL, "layout.gadget",
LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_Label, " GUI Tags ",
LAYOUT_AddChild, OBJ(OBJ_LISTBROWSER) = IIntuition->NewObject(NULL, "listbrowser.gadget",
GA_ID, OBJ_LISTBROWSER,
GA_RelVerify, TRUE,
GA_TabCycle, TRUE,
//LISTBROWSER_AutoFit, TRUE,
LISTBROWSER_Labels, &listbrowser_list,
LISTBROWSER_ColumnInfo, columninfo,
LISTBROWSER_ColumnTitles, TRUE,
LISTBROWSER_ShowSelected, TRUE,
LISTBROWSER_HorizontalProp,TRUE,
LISTBROWSER_Striping, LBS_ROWS,
TAG_DONE),
i hope someone can help me.
problem with horizontal slider in listbrowser-gadget
problem with horizontal slider in listbrowser-gadget
Amiga user since 1987
Sam440Flex 666Mhz, Radeon 9250, 1GB RAM
Sam440Flex 666Mhz, Radeon 9250, 1GB RAM
Re: problem with horizontal slider in listbrowser-gadget
Has noboby a idea for this problem??
Amiga user since 1987
Sam440Flex 666Mhz, Radeon 9250, 1GB RAM
Sam440Flex 666Mhz, Radeon 9250, 1GB RAM
Re: problem with horizontal slider in listbrowser-gadget
@turbo4.1
Modified your code a bit to my liking, but the main points I changed are:
In AllocLBColumnInfo:
replaced LBCIA_Width witg LBCIA_Weight
added (draggable) separators
Added a (n emply) list to the listbrowser
In the Listbrowser I added this tag:
LISTBROWSER_AutoVirtualWidth, TRUE,
and gave the object a minimum width:
CHILD_MinWidth, 260,
The code for the LISTBROWSER macro:
Hope you may have some help from this.
Btw: I tested it and it looks 'nice'.
OldFart
Modified your code a bit to my liking, but the main points I changed are:
In AllocLBColumnInfo:
replaced LBCIA_Width witg LBCIA_Weight
added (draggable) separators
Added a (n emply) list to the listbrowser
In the Listbrowser I added this tag:
LISTBROWSER_AutoVirtualWidth, TRUE,
and gave the object a minimum width:
CHILD_MinWidth, 260,
Code: Select all
BOOL MainBody(struct ExecParam *xn)
{
INFO_ENTER
BOOL Success = FALSE;
if ((PD->pd_ColumnInfo = IListBrowser->AllocLBColumnInfo(2, LBCIA_Column, 0,
LBCIA_Title, " GUI Attributes",
LBCIA_Weight, 30,
LBCIA_DraggableSeparator, TRUE,
LBCIA_Separator, TRUE,
LBCIA_Column, 1,
LBCIA_Title, " BOOL",
LBCIA_Weight, 10,
TAG_DONE)))
{
if ((PD->pd_List = IExec->AllocSysObjectTags(ASOT_LIST, TAG_END)))
{
WindowStandardObject(WOID_MAIN),
WA_IDCMP, 0
| IDCMP_CLOSEWINDOW
| IDCMP_GADGETUP
,
WINDOW_MainBox(BOXID_MAIN),
LAYOUT_Orientation, LAYOUT_VERTICAL,
LAYOUT_NamedBox(BOXID_CURRENT, "Current project"),
LAYOUT_ListBrowser(GOID_FILENAME, NULL, PD->pd_List, PD->pd_ColumnInfo),
LISTBROWSER_HorizontalProp, TRUE,
LISTBROWSER_AutoVirtualWidth, TRUE,
LISTBROWSER_VertSeparators, TRUE,
LISTBROWSER_Striping, LBS_ROWS,
LAYOUT_ListBrowserEnd,
CHILD_MinWidth, 260,
LAYOUT_NamedBoxEnd,
WINDOW_MainBoxEnd,
WindowObjectEnd;
Success = Handle_WindowObject(xn, WOID_MAIN, WID_MAIN);
IExec->FreeSysObject(ASOT_LIST, PD->pd_List);
PD->pd_List = NULL;
}
ELSE_ERROR("Allocate SysObject (struct List)");
IListBrowser->FreeLBColumnInfo(PD->pd_ColumnInfo);
PD->pd_ColumnInfo = NULL;
}
ELSE_ERROR("Allocate LB ColumnInfo");
INFO_VACATE
return Success;
}
Code: Select all
# define LAYOUT_ListBrowser(GadID, HintInfo, Labels, ColumnInfo) \
LAYOUT_AddChild, \
GE->ge_GadObj[GadID] = (Object*) IIntuition->NewObject(ListBrowserClass, NULL,\
GA_ID, GadID, \
GA_HintInfo, HintInfo, \
GA_RelVerify, TRUE, \
GA_TextAttr, xn->xn_FixedFont, \
LISTBROWSER_Labels, Labels, \
LISTBROWSER_Spacing, STD_GADGET_SPACE, \
LISTBROWSER_ColumnInfo, ColumnInfo, \
LISTBROWSER_ColumnTitles, (ColumnInfo)?(TRUE):(FALSE), \
LISTBROWSER_VertSeparators, TRUE
# define LAYOUT_ListBrowserEnd 0UL)
Btw: I tested it and it looks 'nice'.
OldFart
X5000, appears to be sick. Dismantled jan 1, 2024.
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
Re: problem with horizontal slider in listbrowser-gadget
@OldFart
Thanks you for your answer!
i will test your solution/hint the next days, if it will fit my requirements.
it is very importent for me, that i can use fixed witdh columns for my project.
Thanks you for your answer!
i will test your solution/hint the next days, if it will fit my requirements.
it is very importent for me, that i can use fixed witdh columns for my project.
Amiga user since 1987
Sam440Flex 666Mhz, Radeon 9250, 1GB RAM
Sam440Flex 666Mhz, Radeon 9250, 1GB RAM