yab | yet another Basic for HAIKU

Full Version: View remove and scrollbar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everybody,

i have make a view and on this view i have add scrollbars, but when i remove this view the scrollbar are avaiable.
I think view remove doesn't work correctly.

i use YAB 1.7.5 (but this problem is older) with Haiku os -> 49562

View 2,120 to WindowSize_x-15,WindowSize_y-35, "Malflaeche", Start_FensterName$
SCROLLBAR "scroll", 3, "Malflaeche" //"Malflaeche"
SCROLLBAR SET "scroll", "plain-border"
SCROLLBAR SET "scroll", "Vertical Position", 0
SCROLLBAR SET "scroll", "Horizontal Position", 0

view_exists=view get "Malflaeche","exists"
print view_exists
if (view_exists=1) then
view remove "Malflaeche"
endif

Best Regards

lorglas
It seems the scrollbars are actually attatched to the parent view. place the view you wish to scroll on another view and remove both the scrollable view and its parent.

Code:
View 2,120 to WindowSize_x,WindowSize_y, "parentview", Start_FensterName$
View 0,0 to WindowSize_x-15,WindowSize_y-35, "Malflaeche", "parentview"
SCROLLBAR "scroll", 3, "Malflaeche" //"Malflaeche"
SCROLLBAR SET "scroll", "plain-border"
SCROLLBAR SET "scroll", "Vertical Position", 0
SCROLLBAR SET "scroll", "Horizontal Position", 0

view_exists=view get "Malflaeche","exists"
print view_exists
if (view_exists=1) then
view remove "Malflaeche"
view remove  "parentview"
endif
Hello bbjimmy,

create solution. I have also test it befor, but i have make a mistake with the extra view.
I works, nice.

Smile

(08-24-2015, 03:04 PM)bbjimmy Wrote: [ -> ]It seems the scrollbars are actually attatched to the parent view. place the view you wish to scroll on another view and remove both the scrollable view and its parent.

Code:
View 2,120 to WindowSize_x,WindowSize_y, "parentview", Start_FensterName$
View 0,0 to WindowSize_x-15,WindowSize_y-35, "Malflaeche", "parentview"
SCROLLBAR "scroll", 3, "Malflaeche" //"Malflaeche"
SCROLLBAR SET "scroll", "plain-border"
SCROLLBAR SET "scroll", "Vertical Position", 0
SCROLLBAR SET "scroll", "Horizontal Position", 0

view_exists=view get "Malflaeche","exists"
print view_exists
if (view_exists=1) then
view remove "Malflaeche"
view remove  "parentview"
endif
Free Web Hosting