From c50bb3b7c6c67c239164521bb62a4169ee95c2af Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 10 May 2020 10:00:04 +0000 Subject: [PATCH] graph: attempt to fix editbox table wider editbox git-svn-id: svn://kolibrios.org@7908 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/other/graph/hello.cpp | 4 ++-- programs/other/table/hello.cpp | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/programs/other/graph/hello.cpp b/programs/other/graph/hello.cpp index f891cb6085..6d68028ee7 100644 --- a/programs/other/graph/hello.cpp +++ b/programs/other/graph/hello.cpp @@ -44,8 +44,8 @@ double x1,y1,x2,y2; char *funct = NULL; char edit_path[256]; -edit_box mybox = {0,92,WND_H-16-32,0xffffff,0x94AECE,0,0x808080,0x10000000, - sizeof(edit_path)-1,0,(dword)&edit_path, 0, 0}; +edit_box mybox = {0,92,WND_H-16-32,0xffffff,0x94AECE,0,0x808080,0x10000000, + sizeof(edit_path)-1,(dword)&edit_path, 0, 0}; char *full_head; diff --git a/programs/other/table/hello.cpp b/programs/other/table/hello.cpp index cb1310125d..f94be98fcd 100644 --- a/programs/other/table/hello.cpp +++ b/programs/other/table/hello.cpp @@ -59,12 +59,15 @@ kosSysColors sc; // editbox data char edit_text[256]; -edit_box cell_box = {0,9*8-6,WND_H - 16-32,0xffffff,0x94AECE,0,0x808080,0x10000000,255,(dword)&edit_text,0,0}; +edit_box cell_box = {0,9*8-6,WND_H - 16-32,0xffffff,0x94AECE,0, + 0x808080,0x10000000,sizeof(edit_text)-1,(dword)&edit_text,0,0}; // scrolls #define SCROLL_SIZE 16 -scroll_bar scroll_v = { SCROLL_SIZE,200,398, NULL, SCROLL_SIZE,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; -scroll_bar scroll_h = { 200,NULL,SCROLL_SIZE, NULL, SCROLL_SIZE,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; +scroll_bar scroll_v = { SCROLL_SIZE,200,398, NULL, SCROLL_SIZE,0,115, + 15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; +scroll_bar scroll_h = { 200,NULL,SCROLL_SIZE, NULL, SCROLL_SIZE,0,115, + 15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; // ячейки - их параметры и текст DWORD col_count = 100, row_count = 100; @@ -112,7 +115,8 @@ DWORD nx = 0, ny = 0; // редактирование имени файла bool fn_edit = 0; char fname[256]; -edit_box file_box = {160,9*8+12,WND_H - 16-32,0xffffff,0x94AECE,0,0x808080,0x10000000,255,(dword)&fname,0,0}; +edit_box file_box = {160,9*8+12,WND_H - 16-32,0xffffff,0x94AECE, + 0,0x808080,0x10000000,sizeof(fname)-1,(dword)&fname,0,0}; // изменение размеров #define SIZE_X 1 // состояние @@ -557,8 +561,10 @@ void draw_window() int panel_y = cHeight - MENU_PANEL_HEIGHT + 1; kos_DrawBar(0, panel_y, cWidth, MENU_PANEL_HEIGHT-1, sc.work); kos_WriteTextToWindow(3 + 1, panel_y + 14, 0x90, sc.work_text, (char*)sFilename, 0); + file_box.top = panel_y + 10; - #define BTX 230 + file_box.width = cWidth - 265; + int BTX = cWidth - 190; #define BTW 70 //save kos_DefineButton(BTX + 25, file_box.top, BTW, 21, SAVE_BUTTON, sc.work);