
Should be fixed now!
Please download again.
Regards,
Mischa
I soppose you are looking for "OpenWindow" and no "OpenWindow()""gDesign begins gadget parsing at actual editor line position.
It searches for next OpenWindow(). It ends if it founds another
OpenWindow() or CloseWindow() or end-of-file."
The window resize is always by the right hand... could be in both sides?Mischa wrote:Small update:
gDesign - version 0.95
-Added: Window size can be changed (by mouse or SHIFT and cursor keys)
Let me test the new download...Mischa wrote:@Chen
ContainerGadget gadgets working fine here.
Do you have small example source for me?
I tested the new download and I have several problems...Mischa wrote:Small update:
@Chen
ContainerGadget gadgets working fine here.
Do you have small example source for me?
Code: Select all
; gPreferences[460-5-1-1-0-0-0-244-63]
;/ GuiSR.pb: GUI Search and Replace tool
;/ Kaizensoft - Chen Zarza
;/ December 2005
; --------------------------------------------------------------------------------------
Enumeration
; - 1.- Window Constants
#window1
; - 3.- Gadget Constants
#Panel_0: #Frame3D_0: #bu_saveData: #bu_importData: #Frame3D_4
#op_search: #op_replace: #op_replaceBetween: #op_replaceFromTo: #op_delete
#op_deleteBetween: #op_deleteFromTo: #op_insertBefore: #op_insertAfter: #ch_caseSensitive
#bu_start: #bu_cancel: #bu_newProcess: #bu_close: #cb_filter: #Text_3
#ch_includeSubfolders: #Frame3D_1: #Text_4: #Text_5: #Text_6
#Text_51: #Text_61: #Frame3D_2
#st_directory: #st_backUp: #ed_search: #ed_replace: #tx_actionNane
#tx_completeAction: #bu_clearReplace: #op_selectAll: #op_deselectAll: #li_filesToCheck
#st_filesInList: #st_filesToProcess: #tx_filesInList: #tx_filesToProcess: #bu_directory
#bu_backUp: #Text_14: #Text_15: #st_fileInEdition: #ed_file
#li_result: #Text_18: #Text_19: #Text_20: #Text_21
#Text_22: #Text_23: #Text_24: #Text_25: #Text_26
#Text_27: #st_fileEdited: #st_directoryInProcess: #st_filesMarked: #st_directoryBackUp
#st_filesBackedUp: #st_kindOfOperation: #st_filesStartingProcess: #st_filesProcessed: #st_filesNotProcessed
#Text_28: #Text_31: #Text_30: #Text_32: #Text_33
#ed_from: #ed_to: #Text_35: #find_SearchString: #find_Next
#find_Find: #find_Close: #find_Text_37: #bu_clearFrom: #bu_clearSearch
#bu_clearTo: #hlink_kaizen: #Text_39: #bu_clearResult: #bu_backUpRecovery
#wb_browser: #bi_back: #bi_forward: #bi_stop: #bi_reload
#im_back: #im_forward: #im_stop: #im_reload
#cb_UrlFile: #bu_Go: #bu_browseFile: #bu_clearStatistics
#bu_RecoverSelectedBackup: #bu_DeleteFileInBackup: #bu_DeleteAllBackUpFiles
#co_statistics: #co_result: #co_browser: #co_source: #co_choosefiles: #co_strings
EndEnumeration
Procedure.s Cr(num.l) ; useful to ask several #CRLF$ -> example cr(4)
creturns.s
For i=1 To num
creturns = creturns + #CRLF$
Next
ProcedureReturn creturns
EndProcedure
; 1.- Window Creation
Procedure Open_window1()
If OpenWindow(#window1, 320, 23, 700, 673, "KaizenSoft-S&R", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
; 3.- Gadgets Creation
If CreateGadgetList(WindowID(#window1))
SetGadgetFont(#Text_4, FontID1)
HyperLinkGadget(#hlink_kaizen, 15, 50, 135, 20, "http://www.kaizensoft.com", RGB(0,51,204))
GadgetToolTip(#hlink_kaizen, "Click on Link to KaizenSoft Site")
TextGadget(#Text_39, 15, 25, 135, 25, "KaizenSoft")
SetGadgetColor(#Text_39, #PB_Gadget_FrontColor, RGB(14,44,132))
SetGadgetFont(#Text_39, FontID3)
Frame3DGadget(#Frame3D_1, 15, 70, 130, 100, "Folder Criteria")
Frame3DGadget(#Frame3D_2, 15, 170, 130, 50, "")
TextGadget(#Text_3, 25, 85, 80, 15, "File Type:")
ComboBoxGadget(#cb_filter, 25, 105, 110, 100, #PB_ComboBox_Editable)
GadgetToolTip(#cb_filter, "Formats: *String or String* or *String*")
CheckBoxGadget(#ch_includeSubfolders, 25, 135, 105, 20, "Include Subfolders")
TextGadget(#Text_4, 20, 180, 102, 20, "Options For Actions")
CheckBoxGadget(#ch_caseSensitive, 20, 195, 106, 20, "Case Sensitive")
Frame3DGadget(#Frame3D_4, 15, 220, 130, 205, "Actions")
OptionGadget(#op_search, 25, 238, 100, 15, "Search")
OptionGadget(#op_replace, 25, 257, 100, 15, "Replace")
OptionGadget(#op_replaceBetween, 25, 276, 115, 15, "Replace Between")
OptionGadget(#op_replaceFromTo, 25, 296, 110, 15, "Replace From->To")
OptionGadget(#op_delete, 25, 316, 100, 15, "Delete")
OptionGadget(#op_deleteBetween, 25, 336, 100, 15, "Delete Between")
OptionGadget(#op_deleteFromTo, 25, 357, 100, 15, "Delete From->To")
OptionGadget(#op_insertBefore, 25, 377, 100, 15, "Insert Before")
OptionGadget(#op_insertAfter, 25, 395, 100, 20, "Insert After")
ButtonGadget(#bu_start, 155, 570, 90, 30, "Start Process")
ButtonGadget(#bu_cancel, 245, 570, 90, 30, "Cancel Process")
ButtonGadget(#bu_newProcess, 335, 570, 90, 30, "New Process")
ButtonGadget(#bu_close, 600, 570, 90, 30, "Close Application")
; - Panel0
; Tab Strings
PanelGadget(#Panel_0, 156, 30, 535, 535)
AddGadgetItem(#Panel_0, -1, "Strings")
ContainerGadget(#co_strings, 0, 0, 529, 509)
SetGadgetColor(#co_strings, #PB_Gadget_BackColor , RGB(219,215,181))
TextGadget(#Text_5, 17, 16, 50, 30, "Process Directory:")
SetGadgetColor(#Text_5, #PB_Gadget_BackColor , RGB(219,215,181))
TextGadget(#Text_6, 17, 48, 50, 30, "BackUp Directory:")
SetGadgetColor(#Text_6, #PB_Gadget_BackColor , RGB(219,215,181))
StringGadget(#st_directory, 73, 18, 380, 25, "")
SetGadgetColor(#st_directory, #PB_Gadget_BackColor, RGB(236,233,216))
StringGadget(#st_backUp, 73, 48, 380, 25, "")
SetGadgetColor(#st_backUp, #PB_Gadget_BackColor, RGB(236,233,216))
ButtonGadget(#bu_directory, 460, 18, 60, 25, "Get Files...")
ButtonGadget(#bu_backUp, 460, 47, 60, 25, "Accept...")
EditorGadget(#ed_search, 18, 108, 500, 130)
SetGadgetColor(#ed_search, #PB_Gadget_BackColor, RGB(236,233,216))
EditorGadget(#ed_replace, 18, 293, 500, 185)
SetGadgetColor(#ed_replace, #PB_Gadget_BackColor, RGB(236,233,216))
TextGadget(#tx_actionNane, 73, 83, 445, 15, "Action Name")
SetGadgetColor(#tx_actionNane, #PB_Gadget_BackColor , RGB(219,215,181))
TextGadget(#tx_completeAction, 18, 273, 500, 15, "Complete Action")
SetGadgetColor(#tx_completeAction, #PB_Gadget_BackColor , RGB(219,215,181))
ButtonGadget(#bu_clearReplace, 18, 483, 85, 20, "Clear")
TextGadget(#Text_32, 18, 88, 30, 15, "From:", #PB_Text_Right)
TextGadget(#Text_33, 18, 243, 20, 15, "To:", #PB_Text_Right)
EditorGadget(#ed_from, 18, 103, 500, 70)
SetGadgetColor(#ed_from, #PB_Gadget_BackColor, RGB(236,233,216))
EditorGadget(#ed_to, 18, 178, 500, 65)
SetGadgetColor(#ed_to, #PB_Gadget_BackColor, RGB(236,233,216))
ButtonGadget(#bu_clearFrom, 103, 248, 85, 20, "Clear From")
ButtonGadget(#bu_clearSearch, 18, 248, 85, 20, "Clear")
ButtonGadget(#bu_clearTo, 189, 248, 85, 20, "ClearTo")
CloseGadgetList()
; - Tab Choose Files
AddGadgetItem(#Panel_0, -1, "Choose Files")
ContainerGadget(#co_choosefiles, 0, 0, 529, 509)
SetGadgetColor(#co_choosefiles, #PB_Gadget_BackColor , RGB(219,215,181))
OptionGadget(#op_selectAll, 14, 58, 70, 20, "Select All")
OptionGadget(#op_deselectAll, 94, 58, 80, 20, "Deselect All")
flags_ftc.l = #PB_ListIcon_CheckBoxes | #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect
ListIconGadget(#li_filesToCheck, 14, 83, 500, 415, "Status", 50, flags_ftc)
SetGadgetColor(#li_filesToCheck, #PB_Gadget_BackColor, RGB(255,250,215))
SetGadgetColor(#li_filesToCheck, #PB_Gadget_LineColor , RGB(206,201,155))
StringGadget(#st_filesInList, 348, 8, 60, 20, "", #PB_String_ReadOnly)
StringGadget(#st_filesToProcess, 348, 33, 60, 20, "", #PB_String_ReadOnly)
TextGadget(#tx_filesInList, 413, 12, 85, 20, "Files In List")
SetGadgetColor(#tx_filesInList, #PB_Gadget_BackColor , RGB(219,215,181))
TextGadget(#tx_filesToProcess, 413, 36, 85, 20, "Files To Process")
SetGadgetColor(#tx_filesToProcess, #PB_Gadget_BackColor , RGB(219,215,181))
mesg$ = "Files to Process: " + Cr(1)
mesg$ = mesg$ + "UNCHECK Files you DO NOT want to process " + Cr(1)
mesg$ = mesg$ + "DoubleClick on the File Name to Edit/Browse"
TextGadget(#Text_28, 14, 8, 250, 45, mesg$)
SetGadgetColor(#Text_28, #PB_Gadget_BackColor , RGB(219,215,181))
SetGadgetColor(#Text_28, #PB_Gadget_FrontColor , RGB(0,0,128))
CloseGadgetList()
CloseGadgetList()
EndIf
EndIf
EndProcedure
Open_window1()
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Code: Select all
hwnd=OpenWindow(0,0,0,100,100,"")
CreateGadgetList(hwnd)
....
and this one.No 'OpenWindow()' found!
Code: Select all
hWnd_Main=OpenWindow(0, 0, 0, 700, 530, #App_Name, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
If hWnd_Main And CreateMenu(0, hWnd_Main) And CreateGadgetList(hWnd_Main)
OpenSubMenu("파일(&F)")
MenuItem(#MENU_Create, "체크섬 파일 생성(&C)"+Chr(9)+"Alt+C")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_Alt|#PB_Shortcut_C, #MENU_Create)
MenuItem(#MENU_Verify, "파일 검사(&V)"+Chr(9)+"Alt+V")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_Alt|#PB_Shortcut_V, #MENU_Verify)
MenuItem(#MENU_Refresh, "폴더 목록 갱신(&R)"+Chr(9)+"F5")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_F5, #MENU_Refresh)
MenuBar()
MenuItem(#MENU_Exit, "프로그램 종료(&X)"+Chr(9)+"Alt+X")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_Alt|#PB_Shortcut_X, #MENU_Exit)
CloseSubMenu()
OpenSubMenu("설정(&O)")
MenuItem(#MENU_InclSub, "하위 폴더를 포함하여 작업(&S)")
MenuItem(#MENU_SelOnly, "선택한 파일만을 대상으로 작업(&F)")
MenuBar()
MenuItem(#MENU_Option, "프로그램 옵션 설정(&O)")
CloseSubMenu()
MenuItem(#MENU_About, "프로그램 정보")
Frame3DGadget(#frm, 0, 0, 900, 2, "", #PB_Frame3D_Single)
ContainerGadget(#cntn_create, 0, 2, 700, 470)
ContainerGadget(#cntn1, 0, 5, 575, 70);, #PB_Container_Flat)
Frame3DGadget(#frm_cs_name, 8, 2, 266, 63, "체크섬 파일명")
OptionGadget(#rd_cs_name_def, 20, 18, 115, 20, "")
OptionGadget(#rd_cs_name_folder, 146, 18, 117, 20, "")
OptionGadget(#rd_cs_name_user, 20, 40, 50, 20, "기타:")
StringGadget(#str_cs_name_user, 75, 38, 153, 22, *opt\cs_name_user)
TextGadget(#txt_cs_name_user, 232, 42, 37, 20, "")
TextGadget(#txt_filter, 300, 20, 180, 20, "탐색 창 표시 파일 종류"):SetGadgetFont(#txt_filter, FontID1)
ComboBoxGadget(#cmb_filter, 300, 40, 145, 1000, #PB_ComboBox_Editable)
ButtonGadget(#btn_create, 459, 9, 110, 25, "체크섬 파일 생성")
ButtonGadget(#btn_verify, 459, 39, 110, 25, "파일 검사")
CloseGadgetList()
ButtonGadget(#btn_skip, 575, 14, 110, 25, "현재 파일 건너뜀")
ButtonGadget(#btn_cancel, 575, 44, 110, 25, "작업 취소")
ContainerGadget(#cntn2, 8, 75, 684, 360, #PB_Container_Single)
ExplorerTreeGadget(#exptree, 3, 3, 260, 353, "", #PB_Explorer_AlwaysShowSelection|#PB_Explorer_AutoSort|#PB_Explorer_NoFiles|#PB_Explorer_NoMyDocuments)
ExplorerListGadget(#explist, 266, 3, 413, 353, "", #PB_Explorer_AlwaysShowSelection|#PB_Explorer_AutoSort|#PB_Explorer_FullRowSelect|#PB_Explorer_MultiSelect|#PB_Explorer_NoDirectoryChange|#PB_Explorer_NoFolders|#PB_Explorer_NoParentFolder|#PB_Explorer_GridLines)
CloseGadgetList()
CloseGadgetList()
TextGadget(#txt_current, 10, 442, 105, 15, "현재 파일 진행"):SetGadgetFont(#txt_current, FontID1)
TextGadget(#txt_speed_current, 190, 445, 45, 15, "0", #PB_Text_Right)
TextGadget(#txt_speed, 238, 445, 35, 15, "MB/s")
TextGadget(#txt_total, 280, 442, 105, 15, "전체 파일 진행"):SetGadgetFont(#txt_total, FontID1)
TextGadget(#txt_time_current, 555, 445, 60, 15, "0:00:00", #PB_Text_Right)
TextGadget(#txt_time, 623, 445, 12, 15, "/");, #PB_Text_Border)
TextGadget(#txt_time_total, 630, 445, 60, 15, "0:00:00", #PB_Text_Right);|#PB_Text_Border)
ProgressBarGadget(#prgb_current, 8, 460, 264, 15, 0, 256, #PB_ProgressBar_Smooth)
ProgressBarGadget(#prgb_total, 278, 460, 414, 15, 0, 400, #PB_ProgressBar_Smooth)
CreateStatusBar(#stbar, hWnd_Main)
AddStatusBarField(600)
AddStatusBarField(200)
EndIf
thats true...BTW, I found a bug.
Code:
hwnd=OpenWindow(0,0,0,100,100,"")
CreateGadgetList(hwnd)
....
I tried to run your code but it crashes, bacause I dont have installed the charsand this one.
chen wrote:breeze4me wrote:I tried to run your code but it crashes, bacause I dont have installed the charsand this one.
you use.... BUT
You need to separete the OpenWindow from the equal sign
until Mischa fix this bug.
I tested and it open with gDesign... maybe I dont get you and the problem is other stuff.
Code: Select all
ContainerGadget(#cntn1, 0, 5, 575, 70);, #PB_Container_Flat)
Code: Select all
ContainerGadget(#cntn1, 0, 5, 575, 70)
Code: Select all
If hWnd_Main And CreateGadgetList(hWnd_Main) And CreateMenu(#menu, hWnd_Main)
Code: Select all
If hWnd_Main And CreateGadgetList(hWnd_Main)
If CreateMenu(#menu, hWnd_Main)
....
Code: Select all
; gPreferences[460-5-1-1-794-154-0-69-67]
hWnd_Main=OpenWindow(0, 0, 0, 700, 530, #App_Name, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
If hWnd_Main
CreateMenu(0, hWnd_Main) ;<- one function per line!
CreateGadgetList(hWnd_Main) ;..else gDesign can't find all commands
FontID1=LoadFont(#PB_Any,"System",12,#PB_Font_Bold)
OpenSubMenu("??(&F)")
MenuItem(#MENU_Create, "??? ?? ??(&C)"+Chr(9)+"Alt+C")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_Alt|#PB_Shortcut_C, #MENU_Create)
MenuItem(#MENU_Verify, "?? ??(&V)"+Chr(9)+"Alt+V")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_Alt|#PB_Shortcut_V, #MENU_Verify)
MenuItem(#MENU_Refresh, "?? ?? ??(&R)"+Chr(9)+"F5")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_F5, #MENU_Refresh)
MenuBar()
MenuItem(#MENU_Exit, "???? ??(&X)"+Chr(9)+"Alt+X")
AddKeyboardShortcut(#wnd_Main, #PB_Shortcut_Alt|#PB_Shortcut_X, #MENU_Exit)
CloseSubMenu()
OpenSubMenu("??(&O)")
MenuItem(#MENU_InclSub, "?? ??? ???? ??(&S)")
MenuItem(#MENU_SelOnly, "??? ???? ???? ??(&F)")
MenuBar()
MenuItem(#MENU_Option, "???? ?? ??(&O)")
CloseSubMenu()
MenuItem(#MENU_About, "???? ??")
Frame3DGadget(#frm, 0, 0, 900, 2, "", #PB_Frame3D_Single)
ContainerGadget(#cntn_create, 0, 2, 700, 458)
ContainerGadget(#cntn1, 0, 5, 570, 70);, #PB_Container_Flat)
Frame3DGadget(#frm_cs_name, 8, 2, 266, 63, "??? ???")
OptionGadget(#rd_cs_name_def, 20, 18, 115, 20, "")
OptionGadget(#rd_cs_name_folder, 146, 18, 117, 20, "")
OptionGadget(#rd_cs_name_user, 20, 40, 50, 20, "??:")
StringGadget(#str_cs_name_user, 75, 38, 153, 22, *opt\cs_name_user)
TextGadget(#txt_cs_name_user, 232, 42, 37, 20, "")
TextGadget(#txt_filter, 300, 20, 145, 20, "?? ? ?? ?? ??")
SetGadgetFont(#txt_filter, FontID(FontID1)) ;<-correct gDesign syntax
ComboBoxGadget(#cmb_filter, 300, 40, 145, 1000, #PB_ComboBox_Editable)
ButtonGadget(#btn_create, 459, 9, 110, 25, "??? ?? ??")
ButtonGadget(#btn_verify, 459, 39, 110, 25, "?? ??")
CloseGadgetList()
ButtonGadget(#btn_skip, 575, 14, 110, 25, "?? ?? ???")
ButtonGadget(#btn_cancel, 575, 44, 110, 25, "?? ??")
ContainerGadget(#cntn2, 8, 75, 684, 360, #PB_Container_Single)
ExplorerTreeGadget(#exptree, 3, 3, 260, 353, "", #PB_Explorer_AlwaysShowSelection|#PB_Explorer_AutoSort|#PB_Explorer_NoFiles|#PB_Explorer_NoMyDocuments)
ExplorerListGadget(#explist, 266, 3, 413, 353, "", #PB_Explorer_AlwaysShowSelection|#PB_Explorer_AutoSort|#PB_Explorer_FullRowSelect|#PB_Explorer_MultiSelect|#PB_Explorer_NoDirectoryChange|#PB_Explorer_NoFolders|#PB_Explorer_NoParentFolder|#PB_Explorer_GridLines)
CloseGadgetList()
TextGadget(#txt_current, 10, 442, 105, 15, "?? ?? ??")
SetGadgetFont(#txt_current, FontID(FontID1))
TextGadget(#txt_speed_current, 190, 445, 45, 15, "0", #PB_Text_Right)
TextGadget(#txt_speed, 238, 445, 35, 15, "MB/s")
TextGadget(#txt_total, 280, 442, 105, 15, "?? ?? ??")
SetGadgetFont(#txt_total, FontID(FontID1))
TextGadget(#txt_time_current, 555, 445, 60, 15, "0:00:00", #PB_Text_Right)
TextGadget(#txt_time, 623, 445, 12, 15, "/");, #PB_Text_Border)
TextGadget(#txt_time_total, 630, 445, 60, 15, "0;00;00", #PB_Text_Right);|#PB_Text_Border)
CloseGadgetList()
ProgressBarGadget(#prgb_current, 8, 460, 264, 15, 0, 256, #PB_ProgressBar_Smooth)
ProgressBarGadget(#prgb_total, 278, 460, 414, 15, 0, 400, #PB_ProgressBar_Smooth)
CreateStatusBar(#stbar, hWnd_Main)
AddStatusBarField(600)
AddStatusBarField(200)
EndIf